[FX.php List] A nagging question: Foreach
Jonathan Schwartz
jschwartz at exit445.com
Mon Sep 22 17:15:14 MDT 2008
Leo,
I think that's the point. When you only have a single record, it's
the first, last and middle...it's the one you want.
I believe that my answer is: Use a semi colon to limit the foreach to
the single record...although I suspect that the pair of empty curly
brackets will probably do as well.
Thanks Bob. I take back every Southern Boy joke I ever made about you.
Jonathan
At 1:03 AM +0200 9/23/08, Leo R. Lundgren wrote:
>23 sep 2008 kl. 00.56 skrev Bob Patin:
>
>>Jonathan,
>>
>>You can use this:
>>
>>foreach($findResult['data'] as $key => $value);
>>
>>Notice the semicolon...
>
>Bob; What is this syntax for? I've never seen it being used before.
>The only thing I can think of it accomplishing is to set $key and
>$value to the values of the very last item in the array?
>
>-|
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list
--
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011
More information about the FX.php_List
mailing list