lulu: zeichenfolge auslesen und teile davon extrahieren

Beitrag lesen

Huhu michael

wenn ich das richitg verstehe, ist der rückgabewert von preg_match aber nur true oder false ?

Nein, nicht wirklich

<quote>
preg_match() returns the number of times pattern matches. That will be either 0 times (no match) or 1 time because preg_match() will stop searching after the first match.
</quote>

ich bräuchte aber den string.... ;-)
wie stelle ich das an?

<quote>
If matches is provided, then it is filled with the results of search. $matches[0] will contain the text that matched the full pattern, $matches[1] will have the text that matched the first captured parenthesized subpattern, and so on.
</quote>

siehe auch preg_match_all

http://www.php.net/manual/en/function.preg-match-all.php

Viele Grüße

lulu