Link to home
Start Free TrialLog in
Avatar of bryanlloydharris
bryanlloydharris

asked on

what is the array() function

Hi, in a piece of code, what is the array function and what does it do?

if(!is_array($copy)) $copy = array();
ASKER CERTIFIED SOLUTION
Avatar of Roonaan
Roonaan
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bryanlloydharris
bryanlloydharris

ASKER

Oh I see, but you have to admit it looks just like a function (-:
It's a language construct, just like list($a, $b) = array('valueForA', 'valueForB'); (syntax to set $a to 'valueForA', and $b to 'valueForB');

-r-