Re: array assign

Top Page
Author: PHP Web Development
Date:  
To: PHP Web Development
Subject: Re: array assign
On Thu, 24 Aug 2006 01:37:29 +0800
Andy Sy <andy@???> wrote:

> function returnValue() {
>     return array("VAL_A","VAL_B");
>   }


Sure, this'll work. The following pages should be of interest.

     http://www.php.net/array
     http://www.php.net/manual/en/function.array.php



> Is there a way to somehow assign to $val1 and $val2
> directly?


You can pass $val1 and $val2 by reference, and assign them values inside the
function, i.e.:

     function setValue(&$val1, &$val2) {
         $val1 = "VAL_A";
         $val2 = "VAL_B";
     }


--
pmv
PGP keyID 0xEA5EB160

--------
This email and/or attachments are confidential and may also be legally privileged. If you are not the intended recipient, you are hereby notified, that any review, dissemination, distribution or copying of this email and/or attachments is strictly prohibited. Please notify security@??? immediately by email and delete this message and all its attachments. Thank you.
________________________________________________
PHP Web Development Mailing List
php@??? (#PHP @ irc.free.net.ph)
http://lists.free.net.ph/mailman/listinfo/php
Searchable Archives: http://archives.free.net.ph