Im trying to print a names from sql on php page and sort it in categoris
My rows:
1 anna
2 alena
3 benny
4 dolev
5 niv
I want to print it like this:
A
alena
anna
B
benny
D
dolev
N
niv
EDIT:
I tried
while($row_keke = mysql_fetch_array($result_skey002))
{
$name = $row_keke['name2'];
if (in_array($name[0], $heb_a_z)) {
echo $name[0]."<br />".$name."<br /><br />";
}
}
But you see what the problem with this ..
Thanks for everybody .. ! :)