I have an array that looks like the one below. I would like to iterate over a loop and assign to 3 different variables the corresponding strings. so for instance:
Output:
$mike = 'foo - ';
$john = 'bar foo foo - bar foo foo - bar foo bar - '
$bob = 'bar foo bar bar foo - bar foo - '
What would be a short(est) way of doing this? thanks
Initial array
Array
(
[mike] => Array
(
[0] => foo -
)
[john] => Array
(
[0] => bar foo foo -
[1] => bar foo foo -
[2] => bar foo bar -
)
[bob] => Array
(
[0] => bar foo bar -
[1] => bar foo -
[2] => bar foo -
)
)
$john = $array['john'][0].$array['john'][1].$array['john'][2]...in order to have all elements appended to$johnin this case