PHP Dynamic Variable >>
_____________________
$sajith = ‘kenney’ ;
$kenney = 110 ;
echo $$sajith ;
//will give an output 110
Another Example is:
$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
?>