PHP extract() Function

The extract() function imports variables into the local symbol table from an array.This function uses array keys as variable names and values as variable values. For each element it will create a variable in the current symbol table.This function returns the number of variables extracted on success.This function is used to import variables from an array into the current symbol table. It takes an associative array array and treats keys as variable names and values as variable values. For each key/value pair it will create a variable in the current symbol table, subject to extract_type and prefix parameters.

Example -

Example -