Jump to content

Referencing an array


blinks58

Recommended Posts

I have the following array, called $list:

 

Array
(
    [info] => Array
        (
            [total_rows] => 29619
            [page_rows] =>
        )
   

  • => Array
            (
                [0] => Array
                    (
                        [title] => Barbie
                         => blue
                    )
                [1] => Array
                    (
                        [title] => Teddy bears
                         = red
                    )
            )

 

I am able to successfully

echo $list['info']['total_rows'];

However, I can't figure out how to echo or print_r the "Barbie" line.

echo $list['list'][0]['title'];

won't work.

 

TIA

Link to comment
https://forums.phpfreaks.com/topic/277131-referencing-an-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.