php - how to get the value of the array -
i have array ,i wanna value of array of array think . cant value of array values.so please tell me way can values.
print_r($demo); array ( [] => array ( [0] => research , monitoring , benchmarking ) [1] => array ( [0] => online marketing software ) [2] => array ( [0] => online exposure ) [3] => array ( [0] => research , monitoring , benchmarking ) [4] => array ( [0] => research , monitoring , benchmarking ) [5] => array ( [0] => internet marketing platform providing research , monitoring , benchmarking & ; recommendations - ) [6] => array ( [0] => research monitoring benchmarking ) [7] => array ( [0] => online marketing ) [8] => array ( [0] => online exposure ) [9] => array ( [0] => online marketing ) [10] => array ( [0] => online exposure ) [11] => array ( [0] => marketing software ) [12] => array ( [0] => internet marketing platform providing research monitoring benchmarking amp recommendations ) [13] => array ( [0] => learn how ) [14] => array ( [0] => rough seas ) [15] => array ( [0] => tools empowering ) [16] => array ( [0] => complex take control ) [17] => array ( [0] => tools need ) [18] => array ( [0] => achieve results ) [19] => array ( [0] => criticone online intelligence ) [20] => array ( [0] => gain knowledge amp drive business results ) [21] => array ( [0] => 60 seconds view ) [22] => array ( [0] => plans questions 1300 664 ) [23] => array ( [0] => 1 website ) [24] => array ( [0] => numerous microsites ) [25] => array ( [0] => author images ) [26] => array ( [0] => author images ) [27] => array ( [0] => 1300 664 ) [28] => array ( [0] => learn how ) [29] => array ( [0] => rough seas ) [30] => array ( [0] => tools empowering ) [31] => array ( [0] => complex , take control ) [32] => array ( [0] => tools need ) [33] => array ( [0] => achieve results ) [34] => array ( [0] => ..,leverage criticone online intelligence ) [35] => array ( [0] => gain knowledge & ; drive business results ) [36] => array ( [0] => 60 seconds view ) [37] => array ( [0] => plans questions 1300 664 ) [38] => array ( [0] => 550,why 1 ) [39] => array ( [0] => numerous microsites ) [40] => array ( [0] => author images ) ) criticone
you either access "directly":
echo $demo[2][0]; // "online exposure" or if need go through or several of elements use foreach loop:
foreach ($demo $key => $subarr) { if ($key > 5) { echo $subarr[0]; } } which prints values array index 6 upwards.
notice: these (pretty stupid) examples show how deal multidimensional array. there many more ways deal them, these (to me) 2 natural ones. hope helps.
Comments
Post a Comment