I’ve got the problem, that I want to cut-off a long string after the fourth line-break and have it continue with “…”
<?php
$teststring = "asddsadsadsadsaa\n
asddsadsadsadsaa\n
asddsadsadsadsaa\n
asddsadsadsadsaa\n
asddsadsadsadsaa\n
asddsadsadsadsaa\n";
?>
should become:
<?php
$teststring = "asddsadsadsadsaa\n
asddsadsadsadsaa\n
asddsadsadsadsaa\n
asddsadsadsadsaa...";
?>
I know how to break the string after the first \n but I don’t know how to do it after the fourth.
I hope you can help me.
you can explode the string and then take all the parts you need