Re: Problem with while

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



can i know ur purpose for this code?? maybe we can try to solve if the
purpose is clearly and not misunderstanding...

On Wed, Dec 2, 2009 at 2:14 PM, bazare-iran <info.bazareiran@xxxxxxxxx>wrote:

>
>
> I want $row[?key?] retrieve and get the data values one by one using
> foreach and do some work with them.
>
> Thanks
>
> From: php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com> [mailto:
> php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com>] On Behalf Of
> Adrian Lee
> Sent: December 01, 2009 7:56 AM
>
> To: php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com>
> Subject: Re:  Problem with while
>
> the value of your $row[?key?] should be array in order for you to loop thru
> it.
>
> since it came from the database via $r it's most likely a string.
>
> what do you want to happen to the value of $row[?key?]?
>
> ________________________________
> From: hno <hno2005@xxxxxxxxx <hno2005%40gmail.com> <mailto:
> hno2005%40gmail.com <hno2005%2540gmail.com>> >
> To: php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com> <mailto:
> php-objects%40yahoogroups.com <php-objects%2540yahoogroups.com>>
> Sent: Tue, December 1, 2009 3:06:01 AM
> Subject: RE:  Problem with while
>
> You did not understand me.the $row[?key?] is true and key is the name of
> the column.
>
> Thanks
>
> image002
>
> HNO
>
> From: php-objects@ yahoogroups. com [mailto:php-objects@ yahoogroups. com]
> On Behalf Of Hari KT
> Sent: November 30, 2009 11:40 AM
> To: php-objects@ yahoogroups. com
> Subject: Re:  Problem with while
>
> Your foreach must be like
>
> foreach( $row as $key => $value ) {
> //statement
> }
>
> and not $row[ 'key'] .
>
> Hari K T
>
> http://harikt. com/
>
> ____________ _________ _________ __
> From: hno <hno2005@gmail. com <mailto:hno2005% <hno2005%25> 40gmail.com> >
> To: php-objects@ yahoogroups. com <mailto:php- objects%40yahoog roups.com>
>
> Sent: Mon, 30 November, 2009 12:04:10 PM
> Subject:  Problem with while
>
> HI
>
> How can have a while and a foreach in it?
>
> I have something like this:
>
> While($row=mysqli_ fetch_assoc( $r)){
>
> // code
>
> Foreach($row[ 'key'] as $value){
>
> //code
>
> }
>
> }
>
> But the while loop run just one time and I'm sure it should run more than
> one time and I know the problem is with the foreach .by the way,I can't
> delete the foreach from the while because It works with each row from the
> while loop.
>
> Does anybody has any idea about it?
>
> thanks
>
> image002
>
> HNO
>
> [Non-text portions of this message have been removed]
>
> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
> http://in.yahoo. com/
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
Best Regards,

Evlin Marcelline
MSP Adv UKM
decall29@xxxxxxxxx


[Non-text portions of this message have been removed]



------------------------------------

Are you looking for a PHP job?
Join the PHP Professionals directory Now!
http://www.phpclasses.org/jobs/
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-objects/join
    (Yahoo! ID required)

<*> To change settings via email:
    php-objects-digest@xxxxxxxxxxxxxxx 
    php-objects-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux