PHP » PYTHON |
login |
register |
about
|
|
use slices:
PHP: substr("abcdef", 2, 3);
Python: "abcdef"[2:3] substr(PHP 4, PHP 5) substr — Return part of a string Description
string substr
( string $string
, int $start
[, int $length
] )
Returns the portion of string specified by the start and length parameters. Parameters
Return ValuesReturns the extracted part of string. Examples
Example #3 Basic substr() usage
<?php
See Also
|
more
Recently updated
more
Most requested
|