php extract

Solutions on MaxInterview for php extract by the best coders in the world

showing results for - "php extract"
Henri
18 Apr 2019
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 
Leni
25 Oct 2017
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;