Jump to content

change the name of a variable inside an array bracket


jeff5656

Recommended Posts

I am echoing a variable that is an array.  I want to change the first part of the variable but don't know how to manipulte names inside the ['brackets']


echo $row['v1_name']);?>


 

lets say I have a value called $var = v1.  How do I substitute that like this:

echo $row[$var.'_name']);?>

 

I know the above doesnt work, but thats what i want it to do :-)

 

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.