Re: function sql question
| From: | John Fishworld | Date: | Sun, 05 May 2002 17:55:17 +0000 |
| Subject: | Re: function sql question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96162@lists.php.net to get a copy of this message | ||
duh !
yeah that makes sense !
but it doesn't work !
I've no idea why but it refuses to give any information back !
I've managed to get round this by now no loger declaring it a function
but just actually requiring it where i need it
require ("get_city_1.inc");
print_r(array_values ($city));
I've also chopped the return part
and just return the values
$city[0] = $city_id;
$city_name[1] = $city_name;
Strange
> > return 1;
> > return $city_id;
> > return $cityname;
>
> You can't return 3 values...try returning an array, instead.
>
> $ret[0] = $city_id;
> $ret[1] = $cityname;
> return $ret;
>
> or...
>
> $ret["City_ID"] = $city_id;
> $ret["CityName"] = $cityname;
> return $ret;
>
> ---John Holmes...
>
>