PHP Manual

PHP funkce substr()

2019-09-11T08:04:04.000Z

Obsah článku

Dostupnost ve verzích: PHP 4.0

Return part of a string

Parametry

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.

Další zdroje

Oficiální dokumentace funkce substr

Jan Barášek   Více o autorovi

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:

Související články

1.
361.

Potřebujete poradit s PHP?

Nabízím trénink vývojářů, konzultace, školení a analýzu návrhových vzorů. Osobně v Praze nebo online.

Napište mi, pokud si nevíte rady.

Lektor: Jan Barášek

V jiných jazycích

Status:
All systems normal.
2025