how loop $_post variable different name, output print_r :
the post :
$_post['post_access_1']; $_post['post_access_2']; $_post['post_access_3']; $_post['post_access_4']; array ( [post_access_1] = array ( [0] = 1 [1] = 6 ) [post_access_2] = array ( [0] = 1 [1] = 4 ) [post_access_3] = array ( [0] = 2 [1] = 5 [2] = 6 ) [post_access_4] = array ( [0] = 2 [1] = 5 ) )
where
1 => 1,6 2 => 1,4 3 => 2,5,6 4 => 2,5
i have search , see no diferent name.
thankyou
you can foreach
loop on post variable this.
foreach ($_post $key => $value){ if (is_array($value)){ echo $key ." array in post."; foreach ($value $k => $v){ echo $k." index , ".$v." value in array."; } } }
Comments
Post a Comment