NYCPHP Meetup

NYPHP.org

[nycphp-talk] $$ question

Rolan Yang rolan at omnistep.com
Thu May 26 01:56:33 EDT 2005


I'd have to agre with Andrew's solution mentioned above.
Looks like your simple script could even do without a function block.
Here's a more concise way of doing it:


=============
$concerts[2005] = array(
array("January 28","Cypress Club - West Palm Beach, FL"),
// etc.
);
$concerts[2006] = array(
array("January 28","Cypress Club - West Palm Beach, FL"),
// etc.
);
 
while (list($year,$data)=each($concerts)) { ?>
<h2>Tour Schedule, <?=$year?></h2>
<table summary="a list of dates on Laura&#8217;s tour schedule for 
<?=$year?>">
<tr><th scope="col">Date</th> <th scope="col">Venue</th></tr>
<?     while(list($trash,$event)=each($data)) {
                ?><tr><td class="left"><?=$event[0]?></td><td 
class="right"><?=$event[1]?></td></tr>
<?     }
?></table>
<?
}
?>


~Rolan



More information about the talk mailing list