What does & beside argument mean in function declaration of e.g. asort()?
Regards,
geetha
http://mycollege.in
http://www.zyxwvutsrqponmlkjihgfedcba.co.in
function declaration of e.g. asort()
Moderator: General Moderators
-
geethalakshmi
- Forum Commoner
- Posts: 31
- Joined: Thu Apr 24, 2008 10:38 pm
Re: function declaration of e.g. asort()
It means your passing a variable by reference, so that any changes made to the copy will affect the original. This is not required with the asort function.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: function declaration of e.g. asort()
notice how in the example on the manual page it's......and not...There's a section in the language reference part of the manual on references for more information.
Code: Select all
asort($fruits);Code: Select all
$fruits = asort($fruits);