|  | Posted by John T on 06/07/05 09:24 
I am trying to make a function that takes an optional parameter that getspassed by reference.
 
 Here is the first line of my function definition:
 
 function funQueryDatabase($strQuery, &$intInsertId = NULL) {
 
 I am getting this error:
 
 Parse error: parse error, expecting `')'' in c:\program
 files\easyphp1-8\www\my_query_database_function.php on line 7
 
 Line 7 is the first line of my function definition (above).
 
 If I take out the & or if I take out the = NULL, then the error goes away,
 but of course it doesn't do what I want.
 
 Is it not possible to have an optional pass-by-reference parameter, or is
 there another value that I should use for the default value?
 
 Thanks very much for any help you can give.
 
 JT
 johntutton@yahoo.com__nospam
  Navigation: [Reply to this message] |