Associative array question
| From: | csnm at ns dot sympatico dot ca | Date: | Sun, 30 May 2004 17:47:58 +0000 |
| Subject: | Associative array question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-187236@lists.php.net to get a copy of this message | ||
Hello,
If I have an associative array like:
$myFriendsAges['Tom']=25;
$myFriendsAges['Bill']=35;
$myFriendsAges['Al']=45;
$myFriendsAges['Mark']=55;
Is there a way to index name into a string. I would like to be able to echo something like:
My friend Bill is 35 years of age.
Is there a way to do this?
Thanks
Tim