Arrays
| From: | John Taylor-Johnston | Date: | Sun, 16 Mar 2003 19:56:41 +0000 |
| Subject: | Arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-139862@lists.php.net to get a copy of this message | ||
I thought I understood this example: http://www.php.net/manual/en/ref.array.php
<?php
$var = array(
'name' => array(
'first' => 'Caleb',
'last' => 'Maclennan'
)
);
echo "My first name is {$var['name']['first']}!";
?>
I can do that. But, my array looks more like:
$var = array (
'AN' => array (
'Description' => 'Accession Number: (AN)',
'ReferenceURL' => 'AN__Accession_Number.jsp',
),
'AU' => array (
'Description' => 'Author(s): (AU)',
'ReferenceURL' => 'AU__Author(s).jsp',
)
)
What I want to get is the keys 'AN' and 'AU' as values.
while (??){
echo "This key is $var[??]<br>";
}
This key is AN
This key is AU
How :) ?
Still learning :)
John