Re: The default values of variables in a function
| From: | Henrik Hansen | Date: | Sun, 24 Sep 2000 20:58:37 +0000 |
| Subject: | Re: The default values of variables in a function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17797@lists.php.net to get a copy of this message | ||
"Matt" <matt@smokescreen.org> wrote:
> 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)
>
what is the error msg? else try:
function RunQuery($sql,$datasource="$app_mySQL_DSN"){
might help or you might try to initialise the variable before using it.
--
Henrik Hansen
hh at mailserver.dk