jeff5656 Posted October 21, 2010 Share Posted October 21, 2010 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 :-) Link to comment https://forums.phpfreaks.com/topic/216499-change-the-name-of-a-variable-inside-an-array-bracket/ Share on other sites More sharing options...
jeff5656 Posted October 21, 2010 Author Share Posted October 21, 2010 Never mind - that actually works. I didn't kow yu could combine variables inside a bracket like you can elsewhere. Link to comment https://forums.phpfreaks.com/topic/216499-change-the-name-of-a-variable-inside-an-array-bracket/#findComment-1124947 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.