note 51463 added to control-structures.alternative-syntax

From: Date: Thu, 31 Mar 2005 11:44:56 +0000
Subject: note 51463 added to control-structures.alternative-syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-87253@lists.php.net to get a copy of this message
To archangelq at NOSPAM archangelq dot net I don't understand your point. Why is: <table> <tr> <?PHP foreach($tableheaderslist as $tableheadername): ?> <th><?PHP echo $tableheadername ?> <?PHP endforeach; ?> </tr> <?PHP foreach($tablerows as $row): ?> <tr> <?PHP foreach($row as $data): ?> <td>$data</td> <?PHP endforeach; ?> <tr> <?PHP endforeach; ?> </table> any better than the normal way: <table> <tr> <?PHP foreach($tableheaderslist as $tableheadername) { ?> <th><?PHP echo $tableheadername ?> <?PHP } ?> </tr> <?PHP foreach($tablerows as $row) { ?> <tr> <?PHP foreach($row as $data) { ?> <td>$data</td> <?PHP } ?> <tr> <?PHP } ?> </table> ?? (ignoring the horrible HTML syntax) ---- Manual Page -- http://www.php.net/manual/en/control-structures.alternative-syntax.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51463 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51463&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51463&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51463&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51463&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51463&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51463&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87253) next »