Is there a way that I can kern a particular text string? Or is there a way that I can insert spaces between each letter?
Ex: PHP is the coding of choice - P H P i s t h e c o d i n g o f c h o i c e
Thanks
there might be a better way, but just an idea. (not tested)
function kern($str) { $tmp = explode("",$str); $return = ''; foreach ($tmp as $v) { $return .=$v." "; } return $return; } echo kern('aspsux');
Thanks for the reply. That sounds like a good idea, but I'm getting an Empty delimiter error.
Use [man]str_split[/man] instead of explode. (If you are using PHP5)
Thanks I'll look into that. I actually got this to work....
function kern($str) { $len = strlen($str); $i = 0; $kern_stg = ""; while ($i < $len) { $kern_stg .= substr($str, $i, 1); $kern_stg .= " "; $i++; } return $kern_stg; } echo kern('aspsux');