PHP Repeat Code Question

SpaceshipSpaceship
Watch

NetworkTown.Net

Account Closed
Impact
2
Hi

I have a quick question, i have the following:

PHP:
<?php

$num_displayed = '3';

?>

Then i have a code like this:

PHP:
 <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="greyBox" width=50%> 
<tr> 
  <td> <table border="0" cellpadding="0" cellspacing="0"> 
      <tr> 
        <td width=100%> <table border="0" cellpadding="0" cellspacing="0" width=100%> 
            <tr> 
              <td align=left class="thead" colspan="5" height=20> <strong><?php    echo  '<a href="view.php?id='.$id.'">'; echo"$title"; echo '</a>'; ?></strong></td> 
               </tr> 
          </table> 
          <p class="normalText" valign=top><?php echo"$description"; ?></p></td> 
      </tr> 

    </table></td>

I want this above code to be repeated to the number in $num_displayed so say that in $num_displayed it $num_displayed = '3'; this above code would be repeated 3 times, dose any one know if php can do this and were i can find the code.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Mikor said:
andysyme said:
Ah the age-old SE methodology... 'code and fix' ;)

Andy

Cant beat the 'Dive right in without planning and then fix your way through a heap of bugs' method, lol
lol, it's the only way I know :D, and I'll never give it up :)
 
0
•••
BillyConnite said:
lol, it's the only way I know :D, and I'll never give it up :)
Same. With Zend and phpMyAdmin, it's not hard to do. Now it used to be hell to change the database structure, and you had to plan everything out. (Old Oracle, MSSQL, etc)
 
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back