What does the & before the function name signify?
Does that mean that the $result is returned by reference rather than by value? If yes then is it correct? As I remember you cannot return a reference to a local variable as it vanishes once the function exits.
function &query($sql) { // ... $result = mysql_query($sql); return $result; } Also where does such a syntax get used in practice ?