Remove   at the beginning of the_excerpt() with str_replace

Try ltrim() to remove characters at the begining of a string.

$str="        Some Stuff here   this is ok and     this is";

echo ltrim(ltrim($str, ' '), ' ');

Leave a Comment

error code: 523