Re: array assign

Top Page
Author: PHP Web Development
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.

> 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";

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 @
Searchable Archives: