Home
PHP
Chart
Class
Components
Cookie Session
Data Structure
Data Type
Date
Design Patterns
Development
DNS
Email
File Directory
Form
Functions
Graphics Image
HTML
Language Basics
Login Authentication
Math
MySQL Database
Network
Operator
PDF
Reflection
Statement
String
Utility Function
Web Services SOAP WSDL
XML
Menu
extract « Data Structure « PHP
PHP
Data Structure
extract
1.
Add the prefix pts to each array key and then make each variable that results into a reference.
2.
Extracting Values from Arrays with extract()
3.
extract( ) function converts elements into variables
4.
extract($points, EXTR_REFS|EXTR_PREFIX_ALL, 'pts');
5.
extract($scores, EXTR_PREFIX_ALL, 'score');
6.
Using extract on an associative array
7.
Using extract with the EXTR_PREFIX_ALL directive
8.
Using EXTR_PREFIX_ALL on a numeric array