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'; ?> Quote Link to comment 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" ?> Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.