How To Use Extract() Function In PHP
Join the DZone community and get the full member experience.Join For Free
Syntax: extract(array,extract_rules,prefix) Sample code:
"Cat","b" => "Dog", "c" => "Horse"); extract($my_array); echo "\$a = $a; \$b = $b; \$c = $c"; ?>OUTPUT:
$a = Cat; $b = Dog; $c = HorseCredit: 4DLink Dir and W3Schools.com | Web4link
Opinions expressed by DZone contributors are their own.