Mailinglisten-Archive |
Schönen Freitag Vormittag!
Ich hab dieses Script:
$string = "text [IMG=111] text [IMG=222] text [IMG=333]";
$search = '#\[IMG=(.*?)\]#';
preg_match ($search, $string, $textArray);
for ($i=0; $i<=count($textArray); $i++) {
echo $textArray[$i]."<br>";
}
Als Ausgabe hab ich mir erhofft:
[IMG=111]
[IMG=222]
[IMG=333]
Ich bekomm aber das:
[IMG=111]
111
Kann mir da wer sagen was ich falsch mache??
Danke!
Harald
php::bar PHP Wiki - Listenarchive