I woud like to sort an array which typically includes names and email addresses. The problem is that the email addresses appear last even though they may start with 'a'
e.g.
$myarray = ("Alex Mayfeild", "David Beckham", "Oliver Twist", "[email protected]", "[email protected]", ........) //and so on
Upon sorting the array using php's sort function "[email protected]" will appear close to the end even though the functionality I would like to achieve is for him to appear after Alex.
natcasesort and natsource functions based on natural ordering seem to fail. Correction: natcasesource works it returns true when working as stated in docs. Thanks @meagar
Is there anyway to achieve the requested functionality. Thanks for any help guys. It is very much appreciated.