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. Quote 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 Quote 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 Quote 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? Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.