0
Hey anyone could you explain the extract(); using associative array ? I'd appreciate your effort greatly .
About extract in use
3 Answers
0
extract is used to convert an array key to name of variable and the value associate of the key to value of the variable
0
Thanks dude
Can you explain this using an example .
0
if you create an array like
$array = array (['day'] => "monday", ['month'] => "april", ['year'] => "2016");
and do extract of this array
extract($array);
you have now $day, $month, $year and you can use it like
echo ($day . " " . $month ." ". $year);
print :
monday april 2016