Dostupnost ve verzích: PHP 4.0

Replace text within a portion of a string


Parametr Datový typ Výchozí hodnota Poznámka
$string mixed   The input string.
$replacement string   The replacement string.
$start int   If start is positive, the replacing will begin at the start'th offset into string.
$length int null If given and is positive, it represents the length of the portion of string which is to be replaced. If it is negative, it represents the number of characters from the end of string at which to stop replacing. If it is not given, then it will default to strlen( string ); i.e. end the replacing at the end of string. Of course, if length is zero then this function will have the effect of inserting replacement into string at the given start offset.

Návratové hodnoty


The result string is returned. If string is an array then array is returned.

Další zdroje…-replace.php

Sponzorované odkazy
Pomohl Vám tento článek?