Suppression des lignes blanches dans une chaine
Publié le 17/08/2012 PHP
<?php $string = preg_replace ("#^\s*#sm" , '', $string);
Les lignes blanches supprimées peuvent contenir des espaces, des tabulations ou être au format Windows \r\n
<?php $string = preg_replace ("#^\s*#sm" , '', $string);