[foreach] - is it proper to...
| From: | Tristan | Date: | Thu, 31 May 2012 16:48:48 +0000 |
| Subject: | [foreach] - is it proper to... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-318045@lists.php.net to get a copy of this message | ||
I'm using Zend Studio and it had a suggestion that I do a foreach as such
foreach($entry as $entry){
}
instead of
foreach($entries as $entry){
}
they both seem to work but, from a readability standpoint and just makes
more sense to me to use method 2. Is it bad practice to go with the 1st
method of coding or preferred?
Thanks, T