Home >Backend Development >PHP Tutorial >tp数组输出,该怎么解决
tp数组输出
数组一
<br />array (size=6)<br /> 10 => string '准备买' (length=9)<br /> 11 => string '不准备换' (length=12)<br /> 12 => <br /> array (size=2)<br /> 0 => string '3厢小轿车' (length=13)<br /> 1 => string '城市SUB' (length=9)<br /> 13 => string '33333' (length=5)<br /> 14 => <br /> array (size=2)<br /> 0 => string '中型' (length=6)<br /> 1 => string '小巧型' (length=9)<br /> 15 => string '全险' (length=6)<br />
<br />array (size=6)<br /> 0 => <br /> array (size=11)<br /> 'id' => string '10' (length=2)<br /> 'wjb_title' => string '请问你现在有车吗?' (length=27)<br /><br /> 1 => <br /> array (size=11)<br /> 'id' => string '11' (length=2)<br /> 'wjb_title' => string '请问您近期准备换车吗?' (length=33)<br /><br /> 2 => <br /> array (size=11)<br /> 'id' => string '12' (length=2)<br /> 'wjb_title' => string '你喜欢什么类型的车?' (length=30)<br /><br /> 3 => <br /> array (size=11)<br /> 'id' => string '13' (length=2)<br /> 'wjb_title' => string '你购车用途' (length=15)<br /><br /> 4 => <br /> array (size=11)<br /> 'id' => string '14' (length=2)<br /> 'wjb_title' => string '你喜欢SUV中的哪一款' (length=27)<br /><br /> 5 => <br /> array (size=11)<br /> 'id' => string '15' (length=2)<br /> 'wjb_title' => string '你购车主要用在' (length=21)<br /><br />
<br /><?php <br /> foreach ($arr1 as $key => $value) {<br /> foreach ($arr2 as $k => $v) {<br /> if ($value['id'] == $k)<br /> {<br /> print_r($v);<br /> }<br /> }<br /> }<br /> ?><br />