Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Substring/PHP/substring.php
Normal file
10
Task/Substring/PHP/substring.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
$str = 'abcdefgh';
|
||||
$n = 2;
|
||||
$m = 3;
|
||||
echo substr($str, $n, $m), "\n"; //cde
|
||||
echo substr($str, $n), "\n"; //cdefgh
|
||||
echo substr($str, 0, -1), "\n"; //abcdefg
|
||||
echo substr($str, strpos($str, 'd'), $m), "\n"; //def
|
||||
echo substr($str, strpos($str, 'de'), $m), "\n"; //def
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue