Dostupnost ve verzích: PHP 4.0
Return part of a string
| Parametr | Datový typ | Výchozí hodnota | Poznámka |
|---|---|---|---|
$string |
string |
není | Zpracovávaný řetězec. |
$start |
int |
není | If start is non-negative, the returned string will start at the start'th position in string, counting from zero. For instance, in the string 'abcdef', the character at position 0 is 'a', the character at position 2 is 'c', and so forth. |
$length |
int |
null | If length is given and is positive, the string returned will contain at most length characters beginning from start (depending on the length of string). |
string
|bool the extracted part of string or false on failure.
Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.
Rád vám pomůžu:
Pomohu vám zavést AI do vašeho projektu – od analýzy a návrhu řešení až po nasazení do produkce. Ušetřete čas, zjednodušte procesy a získejte konkurenční výhodu.
Domluvit konzultaciNabízím trénink vývojářů, konzultace, školení a analýzu návrhových vzorů. Osobně v Praze nebo online.
Napište miNejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.