Jump to content

Need Help With Variable Variables


bschultz

Recommended Posts

I need to use a variable variable.

 

I need:

 

$row['pos_1']

$row['pos_2']

 

to use $i for the numbers

 

I have this:

 

if ($row{[pos_.$i]} == 'ad')

 

which is throwing an error

 

Parse error: syntax error, unexpected '['

 

Any ideas?

 

Thanks!

 

 

Link to comment
https://forums.phpfreaks.com/topic/261616-need-help-with-variable-variables/
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.