实例首页
自学教程
IT工具箱
源代码
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>PHP extract() 实例 - 自学教程(runoops.com)</title> </head> <body> <?php $a = "Original"; $my_array = array("a" => "Cat", "b" => "Dog", "c" => "Horse"); extract($my_array, EXTR_PREFIX_SAME, "dup"); echo "$a = $a; $b = $b; $c = $c; $dup_a = $dup_a"; ?> </body> </html>
运行结果: