1
2<?php
3
4$a = "Original";
5
6$my_array = array("a" => "Cat","b" => "Dog", "c" => "Horse");
7
8extract($my_array);
9
10echo "\$a = $a; \$b = $b; \$c = $c";
11
12?>
13
1$arr = array('mango'=>'My favourite fruit','apple'=>'It is good for health','banana'=>'it is good for bones');
2
3// it will convert array to variable
4
5extract($arr);
6
7echo $mango."</br>";
8
9echo $apple."</br>";
10
11echo $banana;