1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
<p class="text"><b><u><?php echo $a['titre']; ?></u></b><br />
<?php
$sujet=nl2br($a['content']);
$deco=array(""=>"<b>",""=>"</b>",""=>"<u>",""=>"</u>",""=>"<i>",""=>"</i>","[hr]"=>"<hr />",""=>"<s>",""=>"</s>");
$sujet=strtr($sujet,$deco);
$sujet=preg_replace('#\[h(.*)\](.*)\[/h(.*)\]#Usi','<h$1>$2</h$3>',$sujet);
$sujet=preg_replace('#\[color=(.*)\](.*)\[/color\]#Usi','<font color="$1" style="width:auto;">$2</font>',$sujet);
$sujet=preg_replace('#\[img width="(.*)" height="(.*)"\](.*)\[/img\]#Usi','<img src="$3" width="$1" height="$2" />',$sujet);
$sujet=preg_replace('#\[url=(.*)\](.*)\[/url\]#Usi','<a href="$1" style="text-decoration:none;">$2</a>',$sujet);
echo $sujet;
?>
<div class="ajust"></div>
</p> |
Partager