Good day,

In this situation, you should use an array to store the results.

Please check PHP's documentation for more information on how to use arrays.

============================
Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-----Original Message-----
From: John Fishworld [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 11:09 AM
To: Darren Gamble; Php-General-List (E-mail)
Subject: Re: [PHP] syntax


Sorry I think I've badly explained this !

I'm getting results from mysql in a while loop
but I need the results outside of the loops
and so what I want to do is take the first variable from the db
and rename it as variable 1
and then before the end of the while loop have a $i++;

so i want
$newvar_$i = result 1
$newvar_$i = result 2

so I can use them outside the loops as
$newvar_1 and $newvar_2

hope that makes more sense !

>
>
> Can someone please remind me what the correct syntax for this is !
> in a loop
> and want individual
>
> $ned_1_city = blah
> $ned_2_city = blur
>
> I've been trying this but its wrong
>
> $ned_.$i._city = $ned_city ;
>
> thanks
> john
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to