TP Array Output

Source: Internet
Author: User
Array One
Array (size=6) +  = String ' Ready to buy ' (length=9) one by one and  string ' not ready to be swapped ' (length=12),     Array (size=2 )      0 = string ' 3 Saloon Coupe ' (length=13)      1 = string ' City Sub ' (length=9) and  string ' 33333 ' (length=5)  + =     Array (size=2)      0 = String ' Medium ' (length=6)      1 = string ' compact ' (length=9) [  =] All Risks ' (length=6)

Array two
Array (size=6)  0 = =     Array (size=11)      ' id ' = = String ' (length=2)      ' wjb_title ' = = String ' Do you have a car now, please? ' (length=27)  1 = =     Array (size=11)      ' id ' = = String ' One ' (length=2)      ' wjb_title ' = = String ' Are you going to change trains recently? ' (length=33)  2 =     Array (size=11)      ' id ' = = String ' (length=2)      ' wjb_title ' = ' = String ' What type of car do you like? ' (length=30)  3 =     Array (size=11)      ' id ' = = String ' (length=2)      ' wjb_title ' = ' = String ' Your car use ' (length=15)  4 = =     Array (size=11)      ' id ' = = String ' (length=2)      ' wjb_title ' = String ' You like which of the SUV ' (length=27)  5 = =     Array (size=11)      ' id ' = = String ' (length=2)      ' wjb_ Title ' = = String ' Your car is mainly used in ' (LENGTH=21)


{$vo. Wjb_title}
When id= the key value of the array one, read the data of the key value pairs;
For example, id=10 reads the value in the "Ready to Buy" (length=9) of the ten = "string"?


Reply to discussion (solution)

A long time useless TP, do not know grammar is not a problem. The idea is as follows. Add a volist inside the volist to determine if the key value is equal. Equal then the title of the output array one inside

{$vo. Wjb_title}


{$v. Title}

A long time useless TP, do not know grammar is not a problem. The idea is as follows. Add a volist inside the volist to determine if the key value is equal. Equal then the title of the output array one inside

{$vo. Wjb_title}


{$v. Title}


$v. ID does not take the value of the array one, the key of the array one is returned to the serialized


A long time useless TP, do not know grammar is not a problem. The idea is as follows. Add a volist inside the volist to determine if the key value is equal. Equal then the title of the output array one inside

{$vo. Wjb_title}


{$v. Title}


$v. ID does not take the value of the array one, the key of the array one is returned to the serialized


The array 1 can be defined as $arr, and then according to the ID in the array 2, the ID is actually an array of 1 inside the key can be obtained $arr[$VO [' ID ']].

{$vo. Wjb_title}
$arr [$VO [' ID ']]

It is recommended to use the source PHP to write, TP tag is also parsed into the source of PHP, and the amount of code is quite, faster

 
  $value) {foreach ($arr 2 as $k = + $v) {if ($value [' id '] = = $k) {print_r ($v);}}?>



{$it}


This one.
There are two-dimensional arrays in the array, and in this case, the output is an array, then you have to make a value choice.



{$it}


This one.
There are two-dimensional arrays in the array, and in this case, the output is an array, then you have to make a value choice.

Get that complicated, dry bird.

It is recommended to use the source PHP to write, TP tag is also parsed into the source of PHP, and the amount of code is quite, faster

 
  $value) {foreach ($arr 2 as $k = + $v) {if ($value [' id '] = = $k) {print_r ($v);}}?>


Print_r ($v); Is it possible to print a value or an array?



{$it}


This one.
There are two-dimensional arrays in the array, and in this case, the output is an array, then you have to make a value choice.


What does value selection mean?
  • 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.