Re: strings in a function return
| From: | David Robley | Date: | Thu, 30 Aug 2001 02:04:13 +0000 |
| Subject: | Re: strings in a function return | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65150@lists.php.net to get a copy of this message | ||
On Thu, 30 Aug 2001 10:45, Gerard Samuel wrote:
> Mozilla sucks sometimes with email formatting.
> Correction==>
>
> Here is a snippet example.
>
> function assign() {
> global $adminurl, $string;
> top();
> if ($string) {
> $data = explode ("|", $string);
> echo "$data[0]";
> }
> <form>
>
> $array = array("$new_cat,$assigned_to","$job","$assigned_by");
$string = implode("|",$array); return $string;
> }
>
> The variables that form $array are from the form....
Hrm - undefined function top()
?? <FORM> ??
But the rest of it returns what I would expect - a comma followed by two
| - given that I don't have the values referenced in the array. And you
won't either, as they aren't global and aren't passed as parameters.
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
Shift happpens. - Doppler