Einzelnen Beitrag anzeigen
  #3 (permalink)  
Alt 22.04.2021, 18:09
asncm asncm ist offline
Neuer Benutzer
neuer user
Thread-Ersteller
 
Registriert seit: 19.02.2020
Beiträge: 3
asncm befindet sich auf einem aufstrebenden Ast
Standard

So.
konnte das hier umsetzen:
Code:
<?php
$spalte6 = str_replace('101', '<font style="color: #FE2E2E;">101</font>', $spalte6);
$spalte5 = str_replace('101', '<font style="color: #FFF;background-color:#FE2E2E;font-weight:bold;">TEST</font>', $spalte6);
Wie kann ich hier jetzt mehrere Varianten ansteuern ?
Beispiel:
Variante 1 Suche nach 101 funktioniert Ergebnis = TEST
Variante 2 Suche nach 101 = TEST und weitere Suche 332 = TEST2
Da sollen noch mehr varianten rein.



Habe versucht die Suche untereinander nochmal rein zu kopieren...
Klappt aber nicht.
Code:
$spalte6 = str_replace('101', '<font style="color: #FE2E2E;">101</font>', $spalte6);
$spalte5 = str_replace('101', '<font style="color: #FFF;background-color:#FE2E2E;font-weight:bold;">TEST</font>', $spalte6);
$spalte6 = str_replace('332', '<font style="color: #FE2E2E;">332</font>', $spalte6);
$spalte5 = str_replace('332', '<font style="color: #FFF;background-color:#FE2E2E;font-weight:bold;">TEST2</font>', $spalte6);
Vielleicht eine Idee ?

Danke

Geändert von asncm (22.04.2021 um 22:13 Uhr)
Mit Zitat antworten