Aug 15 2007

PHP Dynamic Variable

dynamic.jpg

PHP Dynamic Variable >>
_____________________

$sajith = ‘kenney’ ;

$kenney = 110 ;

echo $$sajith ;
//will give an output 110

Another Example is:

<?php

$fashion1 = ‘fas1′;
$fashion2 = ‘fas2′;
$fashion3 = ‘fas3′;

$fashion = ”;
for($i=1; $i <= 3 ; $i++)
{
$fashion = $fashion. ‘,’ . $ { ‘fashion’ . $i } ;
}

echo $fashion;
//will give an output ,fas1,fas2,fas3

?>

TAGS:

LEAVE A COMMENT

Subscribe Form

Subscribe to Blog

Sponsors

    Advt on sajithmr.com
    Advt on sajithmr.com
    Itslife Online
    Advt on sajithmr.com

Recent Comments

  • Binny V A: Thanks for the post - love the picture ;-)
  • TheAnand: A lot of people are seeing errors with google video chat….is there any other software which has to be...
  • Alex: Wow, interresting analysis you have done! I’m trying to run GoogleVoiceAndVideoSetup on linux, using...
  • Mella Fitriansyah: Nice plugin, I will try to add this plugin in my blog…
  • Mella Fitriansyah: Nice Info, Sir i will reading your another post success for you

Recent Readers

JOIN MY COMMUNITY!

Recent Posts