RE: Results In Variable

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

 



Or just append it...

Example:

$var = "";
$result = mysql_query(³SELECT filename, page_title FROM table²);
while ($row = mysql_fetch_assoc($result))
        {
                $var .= "<a
href=\²$htmldir{$row[?filename¹]}\²>{$row[?page_title¹]}</a><br />";
        }
echo $var;

Arno
 ________________________
 DotContent
 www.dotcontent.net


-----Original Message-----
From: Pastor Steve [mailto:smarquez@xxxxxxxxxxxxxxx]
Sent: 06 February 2006 03:14
To: PHP eMail List
Subject:  Results In Variable


Greetings,

I am attempting to put the results of a ³while² loop into a variable.


Example:

$result = mysql_query(³SELECT filename, page_title FROM table²);
while ($row = mysql_fetch_assoc($result))

        {

                $var = ³<a
href=\²$htmldir{$row[?filename¹]}\²>{$row[?page_title¹]}</a><br />²;
                    echo ³$var²;

        }

I would like for the the entire ³while² statement result to be in a variable
for use outside of the statement. Is that possible?

Thank you for your help,

--
Steve Marquez
Marquez Design

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux