I am having trouble getting the below to sort and show the way i want it to
in the web browser.
Code: Select all
$newposts = array ( $row['name'] => "Name", $row['lova'] => "Past Loves", $row['news'] => "Bash" );
ksort ($newposts);
foreach ( $newposts as $postfield => $postinput )
{
echo "$postinput: $postfield<br>";
}Name: blah blah Past Loves: blahblah
Bash:
Even having it be:
Name: blah blah
Past Loves: blahblah
Bash:
would be just fine.
Right now what it is doing is sorting based on the text grabbed from the DB,
with the Name and Bash fields moving ontop of each other depending
on what was grabbed from the database.
I have tried different types of sort with no luck to make it stay consistent.
Any help is appreciated