Il problema è il seguente:
Il codice che riporto qui sotto è contenuto nella cella "codice" nella tabella "pagine"
Codice PHP:
<?
$db_tabella = "news";
$data = (date("d-m-y"));
$query=mysql_db_query($db_database,"select * from news ORDER BY id DESC LIMIT 0,3",$conn);
$num=mysql_num_rows($query);
$abc=0;
while ( $abc<$num ){
echo '<div align="center">
<table border="0" width="448" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td width="6">
[img]images/template/sx-top.gif[/img]</td>
<td background="images/template/top.gif">
<span style="font-size: 1pt"></span></td>
<td width="6">
[img]images/template/dx-top.gif[/img]</td>
</tr>
<tr>
<td background="images/template/sx.gif" width="6"></td>
<td bgcolor="#808080" style="padding-top: 2px; padding-bottom: 2px">
<p align="center">[b]'.mysql_result($query,$abc,"titolo").' ['.mysql_result($query,$abc,"data").'][/b]</td>
<td width="6" background="images/template/dx.gif"></td>
</tr>
<tr>
<td width="6">
[img]images/template/sx-bottom.gif[/img]</td>
<td background="images/template/bottom.gif">
<span style="font-size: 1pt"></span></td>
<td width="6">
[img]images/template/dx-bottom.gif[/img]</td>
</tr>
<tr>
<td width="6">
[img]images/template/sx-top1.gif[/img]</td>
<td background="images/template/top1.gif">
<span style="font-size: 1pt"></span></td>
<td width="6">
[img]images/template/dx-top1.gif[/img]</td>
</tr>
<tr>
<td width="6" background="images/template/sx.gif"></td>
<td bgcolor="#C0C0C0" style="padding-left: 5px; padding-right: 5px; padding-top:2px; padding-bottom:2px">
'.mysql_result($query,$abc,"testo").'
<hr>
<p style="margin-top: -5px"><span style="font-size: 8pt">[i]by '.mysql_result($query,$abc,"autore").'[/i]</span></p>
</td>
<td width="6" background="images/template/dx.gif"></td>
</tr>
<tr>
<td width="6">
[img]images/template/sx-bottom.gif[/img]</td>
<td background="images/template/bottom.gif">
<span style="font-size: 1pt"></span></td>
<td width="6">
[img]images/template/dx-bottom.gif[/img]</td></tr>
</table>
</div>
<span style="font-size: 5pt">
</span>';
$abc++;
}
?>
Usando questo codice per stampare il contenuto della cella:
Codice PHP:
$querycentro=mysql_db_query($db_database,"select codice from pagine WHERE nome_pagina='".$nomepagina."'",$conn);
$pag=mysql_result($querycentro,0,"codice");
echo $pag;
mi visualizza il codice php
Come posso fare per far convertire il codice in html???
Grazie per le risposte