Do início da string
$texto = ltrim($texto);
No final da string
$texto = rtrim($texto);
No início e no fim da string
$texto = trim($texto);
Todos
$texto = str_replace(‘ ‘, ”, $texto);
$texto = ltrim($texto);
No final da string
$texto = rtrim($texto);
No início e no fim da string
$texto = trim($texto);
Todos
$texto = str_replace(‘ ‘, ”, $texto);
Sem comentários:
Enviar um comentário