Re: Looping within a string?

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

 



On Friday 17 December 2004 11:24, Chris Payne wrote:

Please do not top post.

> Well basically I have a list of items and their prices etc ..... which have
> to be sent via email, so I need to store the data in a string.  I THOUGHT I
> could execute the loop with all the elements (Such as table rows etc ...)
> inside a string, but I was wrong, so how can I store the data PLUS the
> table data into a string?

By 'data' I assume you mean data from the database and by 'table data' I 
assume you mean the HTML markup to output a table?

  $text = '';
  while ($row = mysql_fetch_array($sql_resultc)) {
    $text .= 'some html markup' . $row['id'] . 'more html';
  }

Now stick $text somewhere in the body of your mail.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
 Professor: Oh, dear. She's stuck in an infinite loop and he's an idiot. 
   Well, that's love for you.
*/

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux