slice word out of string php code example Example: substr php <?php // Return "world" from the string: echo substr("Hello world", 6); ?>