kanakana Posted December 10, 2006 Share Posted December 10, 2006 $var1=10;$var2="var1";now how can i get the value 10 from $var1 to $var3 interms of $var2.like $var3=$$var2but the above statement only outputs $var1 not 10;TIA Link to comment https://forums.phpfreaks.com/topic/30145-value-of-variable-in-a-variable/ Share on other sites More sharing options...
papaface Posted December 10, 2006 Share Posted December 10, 2006 Could you explain what you mean by "$var1 to $var3 interms of $var2." Link to comment https://forums.phpfreaks.com/topic/30145-value-of-variable-in-a-variable/#findComment-138583 Share on other sites More sharing options...
alpine Posted December 10, 2006 Share Posted December 10, 2006 A shoot in the dark as i don't fully understand what you need ::) :[code]<?php$var1 = 10;$var2 = $var1; // $var2 = 10$var3 = $var2; // $var3 = 10?>[/code] Link to comment https://forums.phpfreaks.com/topic/30145-value-of-variable-in-a-variable/#findComment-138586 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.