Result Size: 625 x 571
x
 
<!DOCTYPE html>
<html>
<body>
<?php
// Positive numbers:
echo substr("Hello world",10)."<br>";
echo substr("Hello world",1)."<br>";
echo substr("Hello world",3)."<br>";
echo substr("Hello world",7)."<br>";
echo "<br>";
// Negative numbers:
echo substr("Hello world",-1)."<br>";
echo substr("Hello world",-10)."<br>";
echo substr("Hello world",-8)."<br>";
echo substr("Hello world",-4)."<br>";
?>
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_func_string_substr2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:51:07 GMT -->
</html>
×

Report a Problem: