PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
But this doesn't display any names starting with a number or other character.
Can this be remedied to list all of them under say... a hash mark for 'misc'?
$var wrote:
But this doesn't display any names starting with a number or other character.
Can this be remedied to list all of them under say... a hash mark for 'misc'?
Why not use natsort(). I'm not sure how it handles non-alphanumeric characters, but it'll almost certainly put them in some kind of order. Then just split up your array with a foreach loop into groups of the same starting character, unless it's a non-alphanumeric character, in which case you'd just leave all of them in the same group.