0

I have data like this and I need to get it to variable for use please suggest to me how to get them to variable

Array
(
    [data] => Array
        (
            [0] => Array
                (
                    [name] => xxxxxxxxxxxx
                    [category] => yyyyyyyy
                    [id] => 12345666666
                    [data] => ABCDE
                )

            [1] => Array
                (
                     [name] => ZZZZZZZZZZZ
                    [category] => JJJJJJ
                    [id] => 88888888888888
                    [data] => ABCDEHIJK
                )

        )

)

Thank you vary much.

1 Answer 1

1
foreach ($array['data'] as $data) {
    echo $data['name'];
    echo $data['category'];
    ...
}

http://php.net/manual/en/control-structures.foreach.php

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.