PHP Code:
echo "<div class='desbeer'>";
echo "<span class='beer'>";
echo $row ['lieu'];
echo "</span><br/>";
echo "<span class='type'>";
echo $row ['adresse'];
echo "<br />";
echo "Tél.: ";
echo $tel;
echo "<br />";
echo $region;
echo "</span><br>";
echo "<span class='descbeerPh'>";
echo $row['ville'];
echo "<br />";
echo $www;
echo "<div>";
echo $info;
echo "</div>";
echo "</span><br>";
echo "</div>";
Instead of all that, working out whats single and double quotes etc look at using the heredoc syntax www.php.net/heredoc
PHP Code:
$output = EOL<<<
<div class='desbeer'>
<span class='beer'> $row['lieu'] </span>
<br/>
<span class='type'> $row['adresse'] <br /> Tél.:
$tel <br />$region </span><br>
<span class='descbeerPh'> $row['ville'] <br />
$www
<div> $info </div></span><br> </div>
EOL;
echo $output;
and it respects double quotes!
Then you can echo your $output as and when it suits you, maybe after another sql call etc.
You can also truly see how many nested divs and spans you are using.
Bookmarks