Jump to content

Array Help


swamp

Recommended Posts

Hi guys,

 

I've got this array:

 

Array

(

    [0] => Array

        (

            [block_id] => 1

            [template_file] => textpanel.php

        )

 

    [1] => Array

        (

            [block_id] => 2

            [template_file] => textpanel.php

        )

 

)

 

I'm struggling to get to template_file from a foreach loop

 

I have this:

 

$data = $resultset->fetchAll();

foreach ($data as $item){

echo $item->template_file

}

 

Any help is much appreciated, I think I'm just missing something in between $item-> and template_file but not sure what.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/185360-array-help/
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.