petit code pour transformer une chaine de texte en braille
<?php
//http://ophtasurf.free.fr/lebraille.htm
//compléter l'alphabet
$alpha = array(
'a'=>'⠁',
'b'=>'⠃',
'c'=>'⠉',
'd'=>'⠙',
'e'=>'⠑',
'f'=>'⠋',
'g'=>'⠛',
'h'=>'⠓',
'i'=>'⠊',
'j'=>'⠚',
'k'=>'⠅',
'l'=>'⠇',
'm'=>'⠍',
'n'=>'⠝',
'o'=>'⠕',
'p'=>'⠏',
'q'=>'⠟',
'r'=>'⠗',
's'=>'⠎',
't'=>'⠞',
'u'=>'⠥',
'v'=>'⠧',
'w'=>'⠺',
'x'=>'⠭',
'y'=>'⠽',
'z'=>'⠵',
'0'=>'',
'1'=>'',
'2'=>'',
'3'=>'',
'4'=>'',
'5'=>'',
'6'=>'',
'7'=>'',
'8'=>'',
'9'=>'',
' '=>'⠀',
'.'=>'⠲',
':'=>'⠒',
'/'=>'&#;',
''=>'&#;',
''=>'&#;',
);
$txt = (isset($_GET['a']))?$_GET['a']:'mon texte a convertir';
$tmp = str_split($txt);
$res = '';
foreach($tmp as $value){
$res .= $alpha[$value];
}
echo "<h1>$res</h1>";
echo $txt;
?>
