Einzelnen Beitrag anzeigen

Benutzerbild von DGL-luke
DGL-luke

Registriert seit: 1. Apr 2005
Ort: Bad Tölz
4.149 Beiträge
 
Delphi 2006 Professional
 
#2

Re: [PHP] Zeilen in einem Array lokalisieren und löschen

  Alt 12. Mai 2006, 16:12
Delphi-Quellcode:
$regex = "=Wohnort|blabla="

for ($i = 0 ; $i < count($array); $i++)
  if preg_match($regex, $array[i])
    array_delete(i);
there you go... allerdings ist ein regex da fast schon oversized. strpos == 0 würd schon reichen.
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1
  Mit Zitat antworten Zitat