Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
foreach($blauCmd as $cmd) {
$colorCmd = "<font color=\"#0000FF\">".$cmd."</font>";
$code = str_replace($cmd,$colorCmd,$code);
}
foreach($gelbCmd as $cmd) {
$colorCmd = "<font color=\"#0000FF\">".$cmd."</font>";
$code = str_replace($cmd,$colorCmd,$code);
}
Original geschrieben von Mr. FISHMAN
Hi,
also eine Möglichkeit wäre es wenn du alle Befehle die zb blau werden sollen in ein Array schreibst, alle die gelb werden sollen in ein Anderes usw.
$blauCmd = Array (".....");
$gelbCmd = Array (".....");
dann machste:
(der Code steht in $code)
PHP:foreach($blauCmd as $cmd) { $colorCmd = "<font color=\"#0000FF\">".$cmd."</font>"; $code = str_replace($cmd,$colorCmd,$code); } foreach($gelbCmd as $cmd) { $colorCmd = "<font color=\"#0000FF\">".$cmd."</font>"; $code = str_replace($cmd,$colorCmd,$code); }
weiß nicht ob es wirklich funktioniert, is natürlich ne menge Arbeit:|
Gruß MrF