$cadena = "abcñef"; $i = 0;while (mb_substr($cadena,$i,1,'UTF-8')) { printf("Char: %s \n",mb_substr($cadena,$i,1,'UTF-8')); $i++;}