שגיאה:
preg_replace(): Delimiter must not be alphanumeric or backslash in /home/elad/domains/elad.fire-serv.net/public_html/1.php on line 34
ניסיתי ככה:
PHP קוד:
$header='<table border="0" cellpadding="0" cellspacing="0" width="95%" style="border-style: solid; border-width:1px; border-color: white black black white">
<tr>
<td width="100%" colspan="2" style="border-style: solid; border-width:1px; border-color: white; background-color: #99ccff; font-family:Arial; color:white; font-weight:bold;">PHP:</td>
</tr>
<tr>
<td width="3%" valign="top" style="background-color: #99ccff; border-style: solid; border-width:1px; border-color: white;"><code>'.$line.'</code></td>
<td width="97%" valign="top" style="background-color: white;"><div style="white-space: nowrap; overflow: auto;"><code>';
$footer=$t.'</div></code></td>
</tr>
</table>';
$t = 'elad' ;
$t=str_replace("<code>", "$header", $t);
$t=str_replace("</code>", "$footer", $t);
אבל לא עבד לי.. כאילו לא הציג את המבנה בכלל