Estou procurando uma maneira de extrair os primeiros 100 caracteres de uma variável de string para colocar em outra variável para impressão.
Existe uma função que pode fazer isso facilmente?
Por exemplo:
$string1 = "I am looking for a way to pull the first 100 characters from a string variable to put in another variable for printing.";
$string2 = 100charfunction($string1);
print $string2
Para obter:
I am looking for a way to pull the first 100 characters from a string vari