Se usi il for:
Codice PHP:
<?php
$stringa = "<table border=\"0\" width=\"100%\">
<tr>
<td>
<legend>Allineamento titolo </legend></td>
</td>
</tr>
etc... ";
$numerovolte=10;
for($i=1;$i<$numerovolte+1;$i++){
$legenda="<fieldset><legend>Articolo $i</legend>";
echo $legenda.$stringa;
}
?>
o meglio ancora:
Codice PHP:
<?php
$numerovolte=10;
for($i=1;$i<$numerovolte+1;$i++){
echo "<fieldset>
<legend>Articolo $i</legend>
<table border=\"0\" width=\"100%\">
<tr>
<td>
<legend>Allineamento titolo </legend></td>
</td>
</tr>
etc... ";
}
?>
Se invece usi il while:
Codice PHP:
<?php
$limite = 10;
$count = 1;
while($count<$limite+1){
echo "<fieldset>
<legend>Articolo $count</legend>
<table border=\"0\" width=\"100%\">
<tr>
<td>
<legend>Allineamento titolo </legend></td>
</td>
</tr>
etc... ";
$count++;
}
?>