Skip to main content

strpos

Kurzbeschreibung

Sucht das erste Vorkommen des Suchstrings.

Funktionsbeschreibung

strpos( string $_haystack  , string $_needle  , int $_offset  ) :

Beispiele

{%
	$_text = "I wrote this text";

	$_pos = strpos($_text, "i");

	# Outputs: The first occurence of the letter 'i' is on position 10. It IS case sensitive!

	print("The first occurence of the letter 'i' is on position ");
	print($_pos);
	print(". It IS case sensitive!");
%}
Zum Seitenanfang