Home >Backend Development >PHP Tutorial > 请问动态创建变量方法
请教动态创建变量方法
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> Array ( [0] => 65 [1] => 66 [2] => 71 [3] => 73 [65] => Array ( [$_65] => 0 ) [66] => Array ( [$_66] => 0 ) [71] => Array ( [$_71] => 0 ) [73] => Array ( [$_73] => 1 ) )
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> Array ( [0] => 65 [1] => 66 [65] => Array ( [$_65] => 0 ) [66] => Array ( [$_66] => 0 ) )
$ar=Array ( '0' => 65 , '1' => 66 , '65' => Array ( '$_65' => 0 ) , '66' => Array ( '$_66' => 0 ) ) ; foreach($ar as $v){ if(is_array($v)){ foreach($v as $kl=>$vl) eval("$kl=$vl;"); } } var_dump($_65,$_66); //int(0) int(0) <div class="clear"> </div>