The default values of variables in a function
| From: | Matt | Date: | Fri, 22 Sep 2000 02:03:40 +0000 |
| Subject: | The default values of variables in a function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17256@lists.php.net to get a copy of this message | ||
I'm trying to set a default value for a variable in a php function. See
function below.
With the following, it gives me an error because I'm using a variable:
function RunQuery($sql,$datasource=$app_mySQL_DSN)
if I change it to this, it works:
function RunQuery($sql,$datasource="theDSN")
Any ideas as to my this is happening or if there is a work around?