For more information, see php array. This is my question on other websites. please give me some advice.
// This is a standard array, which is clear at a glance, but title => $ Img ['title ?? Is the title value in the Img array? Or what? $ Item = array ('title' => $ Img ['title'], 'description' => $ Img ['text'], 'pic '=> $ Img ['Pic'], 'URL' => $ url), array ('title' => $ Img ['title'], 'description' => $ Img ['text'], 'Pic '=> $ Img ['Pic'], 'URL' => $ url ), array ('title' => $ Img ['title'], 'description' => $ Img ['text'], 'pic '=> $ Img ['Pic'], 'URL' => $ url), array ('title' => $ Img ['title'], 'description' => $ Img ['text'], 'Pic '=> $ Img ['Pic'], 'URL' => $ url ),);
The following array is more complex. what do you mean by arrival ?? For details, click here...
Array (9 ){
[0] => array (4 ){
["Title"] => string (21) "What is sales? "
["Text"] => string (66) "sales is a low-cost and cost-effective marketing method. "
["Pic"] => string (38) "http://cdn.ipai.com/1396127866.jpg"
["Url"] => string (0 )""
}
[1] => array (4 ){
["Title"] => string (23) "article Ma Yi Li Yao Di"
["Text"] => string (23) "article Ma Yi Li Yao Di"
["Pic"] => string (38) "http://cdn.ipii.com/1397285480.jpg"
["Url"] => string (0 )""
}
[2] => array (4 ){
["Title"] => string (18) "click to change password"
["Text"] => string (0 )""
["Pic"] => string (38) "http://cdn.44.com/1398879995.png"
["Url"] => string (55) "http://v.44.com/index/reg/wecha/'.w.formuser.'/shtml"
}
[3] => array (4 ){
["Title"] => string (4) "m horse"
["Text"] => string (6) "description"
["Pic"] => string (38) "http://cdn.ip.com/1398638713.jpg"
["Url"] => string (0 )""
}
};
Reply to discussion (solution)
Array ('title' => $ Img ['title'])
It refers to the key value named title = $ the value of the key name title in the Img array;
The second more complex array you mentioned is not complicated at all. it is just a common two-dimensional array. it is printed to display array (4), array (4 ), do not consider this as an array.
You define a two-dimensional array, and then var_dump ($ arr) will know.
$a = $Img['title'];........array('title'=>$a,........
Equivalent to yours
Array ('title' => $ Img ['title'])
It refers to the key value named title = $ the value of the key name title in the Img array;
The second more complex array you mentioned is not complicated at all. it is just a common two-dimensional array. it is printed to display array (4), array (4 ), do not consider this as an array.
You define a two-dimensional array, and then var_dump ($ arr) will know.
Thank you!