Merci les gars pour les PISTES bien tracées!!!
ça marche nickel
a bientot
Pour d autres qu ont le meme probleme faire:
nl2br_indent(htmlentities($mavar, ENT_QUOTES)) ;
function nl2br_indent($string, $indent = 0)
{
//remove carriage returns
$string = str_replace("\r", '', $string);
//convert indent to whitespaces if it is a integer.
if (is_int($indent)) {
//set indent to length of the string
$indent = str_repeat(' ', (int)$indent);
}
//replace newlines with "<br />\n$indent"
$string = str_replace("\n", "<br />\n".$indent, $string);
//add the indent to the first line too
$string = $indent.$string;
return $string;
}