KOMPOOS.NL

mess letters - PHP

home » php » messletters.html

sitemap


dit zijn MЄƧƧԼЄƬƬЄƦƧ

∂єzє σσк

uitleg messletters procedure

Plaats een kleine php-routine bovenaan jouw pagina en roep de functie mess aan op elke plek van de pagina die je maar wilt. Hieronder staat een regeltje html-code als voorbeeld en dááronder staat de code van de php-routine. Als je op een html-pagina deze functie wilt gebruiken moet je er voor zorgen dat je php op een html-pagina kan parsen.

html-voorbeeld-code voor de messletters


<p>Zó maak je <em><?php mess('MESSLETTERS');?></em></p>

de php routine met de functie mess


<?php
function mess($messletter_text){
$standaard_letters=array("a","b","d","e","f","h","i","j","k","l","m","n","o","p","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
$mess_letter=array("&#945;","&#1074;","&#8706;","&#1108;","&#402;","&#1085;","&#953;","&#1504;","&#1082;","&#8467;","&#1084;","&#951;","&#963;","&#961;","&#1103;","&#1109;","&#1383;","&#965;","&#957;","&#969;","&#967;","&#1091;","z","&#411;","&#385;","&#391;","&#394;","&#1028;","&#401;","&#403;","&#1223;","&#406;","&#646;","&#408;","&#1340;","&#413;","&#416;","&#420;","&#418;","&#422;","&#423;","&#428;","&#434;","&#404;","&#412;","&#1202;","&#435;","&#548;");
echo str_replace($standaard_letters,$mess_letter,$messletter_text);}
?>
Gebruik voor alle voorbeelden op de http://kompoos.nl een valide html5 pagina.