[PHP] Foreach loop syntax

2001-08-14 Thread Keith Devens
Ok, I asked a similar question more than a year ago, so I apologize for being a little redundant :) Why was PHP's foreach loop syntax chosen to be foreach($dogs as $dog){} instead of something more common (Python, Javascript, can't think what else right now) and, to me, more intuitive, like fo

[PHP] Help with prev, next

2001-02-19 Thread Keith Devens
Hi, I'm getting some weird behavior from prev() and next(). If anyone knows what's going on please let me know. Also, please make sure you e-mail me personally in addition to the list. Anyway, here's the problem. Check out the following code: "; #prints out 1 echo next($arr) . ""; #prints out 2