Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 2000051

Re: [PHP3] a list of an array of objects From: Cynic (cynic <email protected>)
Date: 05/04/00

I seem to recall stating someone (Richard Lynch?) that you need
a temp var for this

while(list($index,$object) = each($this->row)) {
         $temp = $this->row[$index] ;
         $temp->$object = '' ;
}

I also seem to recall that person said that your approach
should be possible in PHP4.

At 13:27 4.5.2000 -0400, darcy w. christ wrote the following:
--------------------------------------------------------------
>after searching around, i discovered that i could use each to get the
>key/value pairs for an array of objects. i'm working with what is
>returned from mysql_fetch_object. What i am trying to do is to clear
>all entries for a particular array of objects. i've started by parsing
>out the objects in a while loop:
>
>while(list($index,$object) = each($this->row)) {
> $this->row[$index]->$object = ''
>}
>
>unfortunately, this doesn't seem to work. i get a parse error. Is
>there a better way to loop through this array and either unset or empty
>the values of that object?
>
>--
>~darcy w. christ
>Elegant Communications Inc.
>416.362.9772 x222 | 416.362.8324 fax
>
>--
>PHP 3 Mailing List <http://www.php.net/>
>To unsubscribe, send an empty message to php3-unsubscribe <email protected>
>To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
>To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
>To contact the list administrators, e-mail: php-list-admin <email protected>
------end of quote------

____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

cynic <email protected>
ICQ: 2808 2505

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>