1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
$Commentaires=nl2br($Commentaires);
$Commentaires=str_replace("<br />","<br>",$Commentaires);
$Commentaires = wordwrap($Commentaires,100,"<br>\r\n",1);
$domail = 1;
while ($domail <= $nr_mail):
if ($domail == "1") $var2use = $arr_t1; else $var2use = $arr_t2;
for ($index = 0; $index < count($var2use); $index++)
{
$pattern = preg_match("".$php."[A-z0-9_]*".$php1."", $var2use[$index]); //ereg
if ($pattern)
{
$line = preg_replace_callback("".$php."","$",$var2use[$index]); //ereg_replace
$line = preg_replace_callback("".$php1."","",$line); //ereg_replace
}
else
{
$line = $var2use[$index];
}
$line = addslashes($line) . "<br>";
eval( "\$line = \"$line\";" );
$line = stripslashes($line) . "";
if ($index == 0 && $domail == 1) $linetot1 = $line;
elseif ($index > 0 && $domail == 1) $linetot1 .= $line;
if ($index == 0 && $domail == 2) $linetot2 = $line;
elseif ($index > 0 && $domail == 2) $linetot2 .= $line;
}
++$domail;
endwhile; |
Partager