mouncifb Posted April 13, 2006 Share Posted April 13, 2006 I have a table wihtin an HTML page named usersdata.html and also have a mysql table in database that looks like this:----------------------------------id username----------------------------------0 user11 user2---------------------------------the table within the HTML page stored in /var/www/html/usersdata.html<table><tr><th>Username</th><th>head1</th><th>head2</th><th>head3</th></tr><tr><td><a href="users.php?showuser=y&account=user1">user1</a></td><td>1269</td><td>0.00</td><td>0.00</tr></tr><tr><td><a href="users.php?showuser=y&account=user2">user2</a></td><td>338</td><td>12.49</td><td>10.64</tr></tr></table>Question: How do I accomplish this by writing a PHP script that should look like this:<?phploop fo each user in the mysql table {while opening and searching through the file "userdata.html" {match the first corresponding amount for the user ( example user1's amount is 0.00, user2's amount is: 12.49 as shown in the HTML table)store the match (amount) in a variable "let's say $useramount"store the variable $useramount in another table ( I can manage to do this myself, just to explain the purpose of doing this)}}?>Any help will be appreciated, thanks guys!![email protected] Link to comment https://forums.phpfreaks.com/topic/7363-use-php-for-html-to-csv-conversion/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.