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....





David Robley wrote:
 > On Thu, 30 Aug 2001 10:19, Gerard Samuel wrote:
 >
 >>I was doing it like so ==>
 >>$string = array(var1, var2...);
 >>return string;
 >>
 >>I also tried to implode the array into a string and return the result,
 >>but no go.
 >>
 >>David Robley wrote:
 >>
 >>>On Thu, 30 Aug 2001 09:35, Gerard Samuel wrote:
 >>>
 >>>>Hey all.  I just started venturing into functions.  I have a function
 >>>>that displays a form, but I have a problem with getting the multiple
 >>>>strings back after the submit.  Im tryed a return statement at the
 >>>>bottom of the function, but it cannot take more than one string.  I
 >>>>tried turning the array into a string and returning just the string
 >>>>made sure that the string name was in the global list, still no luck.
 >>>>Is it even possible to return mulitple values from a function??
 >>>>Thanks
 >>>>
 >>>You can only return one variable from a function, but that variable
 >>>can be an array.
 >>>
 >>>This is probably obvious, but you are assigning the result of the
 >>>function to a variable? Eg
 >>>
 >>>$result = my_function($my_parameter, $my_parameter);
 >>>
 >
 > Perhaps if you could show some of the code?
 >
 >




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to