...

View Full Version : In need of clarification...



TPTZ
07-27-2007, 04:52 AM
Quick question: What is the purpose of placing an ampersand in front of the name of a parameter for a function?

_Aerospace_Eng_
07-27-2007, 05:20 AM
Can you post an example of what you are referring to? The context in which its used can mean different things.

TPTZ
07-27-2007, 05:23 AM
No, I highly doubt that. I've seen an ampersand in front of a parameter when it comes to declaring a function

<?
function someFunction($someParam, &$anotherParam)
{
...
}
?>

In that example, what is the purpose of the & in front of the second parameter?

whizard
07-27-2007, 05:24 AM
Sorry, I was wrong..

http://www.php.net/manual/en/functions.arguments.php

That explains it a little better than I can

HTH
Dan

TPTZ
07-27-2007, 05:31 AM
Excellent! Thanks...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum