Ich suche nach einer Möglichkeit, die ersten 100 Zeichen aus einer Zeichenfolgenvariablen zu ziehen, um eine andere Variable zum Drucken einzufügen.
Gibt es eine Funktion, die dies leicht tun kann?
Beispielsweise:
$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
Bekommen:
I am looking for a way to pull the first 100 characters from a string vari