Well, hopefully through all of this, you found something you can use. As you can see, there are multiple ways to get it done. (I avoid preg_replace personally, because I am not up to speed on it, but it is definitely a better way to go.)
Sidenote: Hey Roger, you can use the [man]range()[/man] function to define an alphabetical array you know. Just makes it easier in case you weren't aware; Here's a snippet of how to do it:
//Instead of:
$chars = 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);
//Use:
$chars = range("a", "z");