Header menu


Monday, 16 December 2013

Create variable at runtime in php

Hey ... Today we are going to create variable at runtime from an array;
I have declared an array named $arr and i am iteration array using foreach loop
and for each element creating a variable using   $$ar .
And at last i am printing the created variables.

echo "<pre>";
foreach($arr as $ar){
echo $abc;
echo "<br/>";
echo $def;


Run the above example , to understand more ...