Wednesday 15th August 2007

by Sajith M.R

dynamic.thumbnail

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

?>

· · · ◊ ◊ ◊ · · ·

One Response to “PHP Dynamic Variable”

  1. jaya says:

    nice explanation and example thanks

· · · ◊ ◊ ◊ · · ·

Leave a Reply

وظائف 2011 تحويل العملات برامج برنامج تسريع التحميل برنامج الفلاش برنامج محول الصوتيات عربي hotel 2011 زيادة رواتب العساكر 1431