php - AutoIncrement Array in an Array() : Is that possible? -



php - AutoIncrement Array in an Array() : Is that possible? -

i :

$product[] = array ( "article_title" => valeures, "article_id" => , "article_value" => , "article_price" => "article_picture1" => , "article_picture2" => , "article_picture3" => , "article_picture4" => , "article_friends[]" => array ( "name" => , ), );

but know won't work, i've been looking hours on net , on php.net, don't know how do. want do, getting product[] array can handle product[1]; product [2] ... , within it, got same process : "article_firends[]" autoincremented :

in product[1] : artcile_friends[1][name] = john ; article_freidns[2][name] = nina ... , on product[2] ...

this has been implementedin foreach loop should manage keys automatically .. how can build ?

many thanks, miles

"article_friends[]" => array ( "name" => ,

doesn't create new article_friends sub array. creates key in parent $product array name happens article_friends[].

remove quotes around key, end with

article_friends[] => array ( "name" => , ...

php arrays multidimensional-array foreach

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -