php string text cut first x characters code example Example: substr php <?php // Return "world" from the string: echo substr("Hello world", 6); ?>