|
Hi guys! I just want to ask something very basic. I need to print some array keys on the screen. The only way to print an array I know is print_r(). But that prints the array along with the word Array and all numeric indexes. I just need the keys.
Example:
<?php
$states = array("US" => "Washington","AU" => "Canberra","UK" => "London");
$keys = array_keys($states);
print_r($keys);
?>
This would output:
Array ( [0] => US [1] => AU [2] => UK )
But I want the output to look like this:
US, AU, UK
How can it be done?
__________________
THE FORCE is with me at last! All I need now is some TALKUPATION ;)
|