NYCPHP Meetup

NYPHP.org

[nycphp-talk] $$ question

Daniel Convissor danielc at analysisandsolutions.com
Thu May 26 10:14:28 EDT 2005


On Wed, May 25, 2005 at 11:49:51PM -0400, Michael Southwell wrote:

> The best I can figure out, this does not permit the (easy) creation of two 
> distinct tables.

Sure it does.  

$concerts = array(
    '2005' => array(
        '2005-04-05' => 'a lovely evening',
        '2005-06-10' => 'spring is grand',
    ),
    '2006' => array(
        '2006-01-05' => 'join us in Hawaii',
        '2006-07-05' => 'music in the fall',
    ),
);

$year = '2006';
foreach ($concerts[$year] as $date => $text) {
    echo "On $date see '$text'\n";
}

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list