Jump to content

Using a Variable Variable in an Object


jajtiii

Recommended Posts

When trying to use a var var in an object, I keep getting the following error:

 

Fatal error: Cannot use string offset as an array in C:\Web\apache\www\banookie_cms\plugins\bee_hives\modules\admin.mod.php on line 379

 

Recap:

The following variables resolves as follows:

$data_set resolves to inspection_new_data

$i_id resolves to 308

$myHives->inspection_new_data['unmarked'][308] resolves to 1

 

But, the following variations generate the error above:

 

$queen_opt = "{$myHives->$data_set['unmarked'][$i_id]}";

$queen_opt = $myHives->$data_set['unmarked'][$i_id];

 

Any guidance will be appreciated.

 

Jones

 

Link to comment
https://forums.phpfreaks.com/topic/265236-using-a-variable-variable-in-an-object/
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.