I have this: (note that $info is an Assoc Array while (list ($key, $val) = each ($info)) { do stuff }
I would like to do slightly different stuff if I'm at the very first, or very last item in the array. How do I do this. Below is the pseudo code which would be ideal: while (list ($key, $val) = each ($info)) { if(onFirstKey or onLastKey) do fun stuff else do other stuff } Please help. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php