September 2001
Intermediate to advanced
768 pages
32h 45m
English
int extract(array array, [int collision_flag], [string prefix])
| array | Array containing data to extract |
| collision_flag | What to do on a name collision (see description) |
| prefix | Prefix to give to extracted variables |
Imports variables into the local symbol table from an array.
Returns:
Void in versions of PHP prior to 4.0.5; in 4.0.5 and later versions, returns the number of elements extracted
Description:
This function iterates through the array given by array and, for each element, creates a variable in the local scope that’s named by the key of the element and whose value is the value of the element.
There are a couple of issues of which you should be aware. First, if a variable in the local scope has the same name as one of the ...
Read now
Unlock full access