Geting all array elements of user_meta
-
hi i want to get all elements of an data array and data2 array
i use this code
$get_data = get_user_meta($user_id); $get_all = array( 'data' => $get_data['testing'], 'data2' => $get_data['testing2'] ); print_r($get_all);
if i print_r(get_all[‘data’][0]);
it gives me only 1st element but i need all element of [data] => Arrayhere is my result:
Array
(
[data] => Array
(
[0] => hello
[1] => hello
[2] => hello
[3] => hello
[4] => hello
[5] => hello
[6] => hello
)[data2] => Array
(
[0] => world
[1] => world
[2] => world
[3] => world
[4] => world
[5] => world
[6] => world
))
Thanks in advance
- The topic ‘Geting all array elements of user_meta’ is closed to new replies.