0

I need help. Please, I have a service that I have no control over that shows me formatted data Json

echo print_r( $data);

Array
 (
[0] => Array
    (
        [user] => one
    )

[1] => Array
    (
        [user] => two
    )

[2] => Array
    (
        [user] => three
    )

)

I want to get the data

one
two
three

How can I do that?

Thank You ,

Roanda
  • 3
  • 5
  • 1
    Does this answer your question? [Is there a function to extract a 'column' from an array in PHP?](https://stackoverflow.com/questions/1494953/is-there-a-function-to-extract-a-column-from-an-array-in-php) – catcon Dec 01 '20 at 05:32

1 Answers1

1

use foreach,

foreach($yourdata as $data)
{
 echo $data['user'];
}

this will give you all user .