Please advise, PHP array problem.

Source: Internet
Author: User
This is the problem I see on other websites, please advise
This is a standard array, at a glance, but what does the title=> $Img [' title '] mean?? is the value of title the title of 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 ' and ' = ' $Img [' text '], ' pic ' + $Img [' pic '], ' url ' = = $url), Array (' Title ' = ' $Img [' title '], ' description ' and ' + ' $Img [' text '], ' pic ' + $Img [' pic '], ' url ' = ' + $url ');



The following array is more complex, please point, what does it mean to arrive?? Please detail, novice ...
Array (9) {
[0] = = Array (4) {
["title"] and string (21) "What is a pin?" "
["Text"] + string (66) "PIN is a modern low-cost, high-performance marketing means. "
["pic"] = + string "http://cdn.ipai.com/1396127866.jpg"
["url"] + = string (0) ""
}
[1] = = Array (4) {
["title"] + string (23) "Article Mai Rotten"
["text"] + = string (23) "Article Mai Rotten"
["pic"] = + string "http://cdn.ipii.com/1397285480.jpg"
["url"] + = string (0) ""
}
[2] = = Array (4) {
["title"] + = string (18) "Click to Change Password"
["text"] + = string (0) ""
["pic"] = + string "Http://cdn.44.com/1398879995.png"
["url"] = = string "http://v.44.com/index/reg/wecha/". $formuser. ' /shtml "
}
[3] = = Array (4) {
["title"] + string (4) "M Horse"
["text"] + = string (6) "description"
["pic"] = + string "http://cdn.ip.com/1398638713.jpg"
["url"] + = string (0) ""
}
};


Reply to discussion (solution)

Array (' title ' = = $Img [' title '])
Refers to the key value of the key named title = $IMG The value of the key named title in the array;

You said the second more complex array, it is not complex, it is just a normal two-dimensional array, it is printed to show array (4), Array (4), do not interpret this as an array.
You define a two-dimensional array, and then Var_dump ($arr) will know.

$a = $Img [' title '];........array (' title ' = = $a,........

It's your equivalent.

Array (' title ' = = $Img [' title '])
Refers to the key value of the key named title = $IMG The value of the key named title in the array;

You said the second more complex array, it is not complex, it is just a normal two-dimensional array, it is printed to show array (4), Array (4), do not interpret this as an array.
You define a two-dimensional array, and then Var_dump ($arr) will know.


Thanks, I know.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.