私は次のような配列を持っています:
function example() {
/* some stuff here that pushes items with
dynamically created key strings into an array */
return array( // now lets pretend it returns the created array
'firstStringName' => $whatEver,
'secondStringName' => $somethingElse
);
}
$arr = example();
// now I know that $arr contains $arr['firstStringName'];
のインデックスを見つけて、$arr['firstStringName']
ループしてそのインデックスarray_keys($arr)
でキー文字列を返すことができるようにする必要があり'firstStringName'
ます。どうやってやるの?