I don't like to use the foreach for every little array, I hear'd it is also possible to replace it with some array_ function, but I forget the function name.
This is what I wan't to reach:
$down = array (
"file.rar" => $l->get()->fileDesc(),
"file1.rar" => $l->get()->clientDesc()
);
normally, I'm using this to display the data:
foreach ( $down as $key => $value )
$data .= $key . ' = ' . $value . '<br/>';
So it'll return:
//echo $data;
file.rar = File Description One
file1.rar = Client Description
It there a way to prevent from using the foreach and display the same $data anyway?
I'm just curious, so please be nice.
array_keys, but a foreach is the easiest thing you can do.foreachbut I want to use_some_function_I've seen that function before, but I forgot its name, unfotunately.