
December 2nd, 2012, 01:45 AM
|
|
Contributing User
|
|
Join Date: Nov 2012
Posts: 56
Time spent in forums: 13 h 10 m 2 sec
Reputation Power: 1
|
|
|
Help create a table template
Quote: | Originally Posted by toddyaww We create more table template in HTML web designing. But today table is then use as compare to div class in html. Because it is so easy. |
Ok, the following is the table I want replaced with DIVs function:
Code:
<table width="800" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td> <table width="750" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td align="left"> <? echo "<div align=right>$text</div>"; echo "<table width=700 border=0 cellpadding=0 cellspacing=0 align=left>\n <tr>\n <td> Total No of Records Found: $num \n <td> \n </tr>\n <tr> \n"; //part of paging code if($num) ////////////////// $i=0; $counter=0; while($row=mysql_fetch_array($result)) { $sn=$row['m_id']; $mtitle=$row['mtitle']; $mfilename=$row['mfilename']; if($counter>=0) { echo "<td valign=top>\n <table width=150 border=0 align=left class=allborder> \n <tr> \n <td width=70>$mtitle</td> \n </tr>\n <tr> \n <td><a href=details.php?m_id=$sn><img src=\"./images/{$row['mfilename']}\" width=\"90\" height=\"120\" alt=\"\" /></a> \n </td> </tr>\n </table>\n</td>\n "; $counter++; } if($counter==5) { echo "</tr>\n<tr>\n<td colspn=2> \n</tr>\n<tr>\n"; $counter=0; } } echo "</table>\n"; ?></td> </tr> </table></td> <td> </td> </tr> </table>
My try was I didn't know how to completely replace the table, so I started with the part that returns the query results leaving the rest as it was:
Code:
<div class="ad"> \n <class="image"/><td><a href=details.php?m_id=$sn><img src=\"./images/{$row['mfilename']}\" width=\"90\" height=\"120\" alt=\"\" /><br /> \n <span class="text">$mtitle</span> \n </div> \n
But here I got an error:
Quote: | Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:/Program ... on line 210 |
Line 210 is
I will appreciate any help with this.
Joseph
|