Thread: whats 0:
View Single Post
Old 01-25-2003, 12:06 PM   #5 (permalink)
Ilya020
Techno Rat
 
Ilya020's Avatar
 
Join Date: Jan 2003
Location: San Diego
Posts: 559
Ilya020 is on a distinguished road
Send a message via AIM to Ilya020
Re: Re: whats 0:

Quote:
Originally posted by redhead


The code does what you tell it to do, displayes every item in your list, you have a first item, with identifyer "log->blah" that holds value "foo" in the foreach it just tels you that the identifyer log is reffering to the blah, and that the first item (0) is holding the value foo.


It is _not_ C style, it is a derived feature from the C shell where foreach is buildin as a special command. php programmers just thought it would be a useful command in the php language aswell.
If anything I would say foreach orriginates from perl (http://www-106.ibm.com/developerwork...ry/l-p560.html)
0





Ilya
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020 is offline   Reply With Quote