Why we use extract() in PHP?
The extract() function imports variables into the local symbol table from an array. It uses variable names as array keys and variable values as array values. For each element of an array, it creates a variable in the current symbol table.
$varArray = array("course1" => "PHP",
"course2" => "JAVA","course3" => "HTML");
echo "$course1, $course2, $course3";
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.