Hey Matt,
you can print out the contents of your array by using print_r($arr)
but more useful is using this
foreach ($arr as $key = $value)
{
echo Key : .$key. Value : .$value;
}
Adios
Joe
On 7/13/05, Adam Hubscher [EMAIL PROTECTED] wrote:
Matt Darby wrote:
I have an array setup as
Yeah, you can use foreach.
But *may be* you just find sth called array_keys().
Best regards,
Shiqi Yang
-Original Message-
From: Joe Harman [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 14, 2005 4:45 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: Echo array string index
Matt Darby wrote:
I have an array setup as such: *$arr['generated text']='generated number';*
What would be the best way to echo the key in a loop?
Seems pretty easy but I've never attempted...
Thanks all!
Matt Darby
I'm not sure I understand the question.
You could do foreach($arr as $key
3 matches
Mail list logo