Over a million developers have joined DZone.

How To Use Extract() Function In PHP

·
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 = Horse

Credit: 4DLink Dir and W3Schools.com | Web4link

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}