l0ve2hat3 Posted March 11, 2008 Share Posted March 11, 2008 can i make a variable value into a variable name? ex... <? $myvar = 'value'; $value = 'something'; ?> Link to comment https://forums.phpfreaks.com/topic/95547-variable-value-into-a-variable-name/ Share on other sites More sharing options...
pocobueno1388 Posted March 11, 2008 Share Posted March 11, 2008 You can do it like this: <?php $myvar = 'value'; $$myvar = 'something'; echo $value; //prints "something" ?> Link to comment https://forums.phpfreaks.com/topic/95547-variable-value-into-a-variable-name/#findComment-489138 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Author Share Posted March 11, 2008 yep thats what i want. thank you Link to comment https://forums.phpfreaks.com/topic/95547-variable-value-into-a-variable-name/#findComment-489139 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.