note 92567 deleted from function.array-keys by thiago
| From: | thiago@php.net | Date: | Wed, 29 Jul 2009 17:38:25 +0000 |
| Subject: | note 92567 deleted from function.array-keys by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-158888@lists.php.net to get a copy of this message | ||
Note Submitter: falkon303 at gmail dot com
----
Here's a simple way to loop through the array keys without using print_r in case anyone is
looking for it.
<?
// Code written by Ben Althauser... //
$array = array (
'COUNTRY' => 'Country of Origin',
'NAME' => 'Full Name',
'TITLE' => 'Title',
'SHOESIZE' => 'Shoe Size',
);
$arkeys = array_keys($array);
foreach($arkeys as $i => $arkeys[$i])
{
echo $arkeys[$i]."<br>";
}
?>