php - Echo Arrays in Array -


i have array mutltiple arrays in it. tried echo each of them "array" instead of values saved inside of each arrays.

my array looks this:

$arrays = [['test1','test2'],['test3','test4']];  foreach($arrays $array) {        echo $array, '<br>'; } 

i get:

array array  

instead of

test1,test2 test3,test4 

you're not printing content of inner arrays - try this:

$arrays = [['test1','test2'],['test3','test4']];  foreach($arrays $array) {     echo implode(',', $array) . '<br>'; } 

oh, , why not print_r($arrays)?


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -