search for:

// maybe put letter in the title of the image and then have an image called letter .jpg // or replace spaces automatically with another character before it splits the string //replaces letters with images function toLink($text){ $text = str_replace(" ", "*", $text); $arr1 = str_split($text); $valid_img = '/[a-zA-Z0-9*:]/'; // this sets what characters have images foreach($arr1 as $key=>$value){ if(preg_match($valid_img, $value)){ $arr1[$key] = ''; } } echo implode('',$arr1); } ?>