Atanu Posted December 10, 2006 Share Posted December 10, 2006 <?php $a=5; $b='a';echo $$b;//it prints 5.?>I know it's a dynamic variable.But why it is called DYNAMIC?what is the exact defination of DYNAMIC?????please reply.please. Link to comment https://forums.phpfreaks.com/topic/30123-i-cant-solve-this-problem/ Share on other sites More sharing options...
Zane Posted December 10, 2006 Share Posted December 10, 2006 it means that it could change any time you want it to......for instance if you had a loop like this[code=php:0]for($i=0; $i<3; $i++) { $b='i'; echo $$b;}[/code]it would print012http://en.wikipedia.org/wiki/Dynamic_programming Link to comment https://forums.phpfreaks.com/topic/30123-i-cant-solve-this-problem/#findComment-138485 Share on other sites More sharing options...
kenrbnsn Posted December 10, 2006 Share Posted December 10, 2006 In PHP this is a [url=http://www.php.net/manual/en/language.variables.variable.php]variable variable[/url].Ken Link to comment https://forums.phpfreaks.com/topic/30123-i-cant-solve-this-problem/#findComment-138491 Share on other sites More sharing options...
Atanu Posted December 10, 2006 Author Share Posted December 10, 2006 When will we use it? Link to comment https://forums.phpfreaks.com/topic/30123-i-cant-solve-this-problem/#findComment-138495 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.