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.
$text = preg_replace("=\[code\](.*)\[\/code\]=esiU","htmlspecialchars('\$1')",$text);
echo $text;
function docode( $str_code ) {
$str_code = "<pre>".htmlspecialchars( $str_code )."</pre>";
}
$text = preg_replace("=\[code\](.*)\[\/code\]=esiU","docode('\$1')",$text);
/*
* somit kannste gleich ein Mysql_Result durchlaufen lassen
* also
* $res = mysql_query("select * from $table");
* while($row = mysql_fetch_array($res))
* $row = charToAscii($row);
* das ich auch noch { } ersetze ist absichtlich!
* wenn du mit Templates arbeitest und in diesem Text { } sind
* dann würde er den Text nicht anzeigen weil er meint das es
* ein Platzhalter für Variablen ist!
*/
function charToAscii($array){
foreach($array as $type => $value){
$array[$type] = str_replace("<","<",$value);
$array[$type] = str_replace(">",">",$array[$type]);
$array[$type] = str_replace("{","{",$array[$type]);
$array[$type] = str_replace("}","}",$array[$type]);
}
return $array;
}
//code ausrichtung
$text=preg_replace("/\[code\](.*)\[\/code\]/msiU", "<blockquote><pre><smallfont>code:<hr>\\1<hr></blockquote></pre></smallfont>", $text);
$text = highlight_string ($text);
<code><div class=h1>bla</div></code>