On Thu, 24 May 2001 10:40, adam wrote:
> i need to write a while statement to a variable that will later be
> echoed again on another page after including this file to it. i need to
> repeat a statement over and over in it and i do not know how.
>
>
> <?php
>
> $variable = '<table>
> <tr>
>     <td>' .
>
> do {
> '<font>data to be outputted</font>'
> }while ($something = mysql_fetch_array($query));
>
> .'</td>
> </tr>
> </table>';
>
> ?>
>
> any help?

See the manual entry for mysql_fetch_array(), which gives an example of 
how to do this. You might also find extract() useful.

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   Make it idiot proof and someone will make a better idiot.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to