Showing selected item at top of list


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query("SELECT * FROM names");
Did you know?Explore Trending and Topic pages for more stories like this.



$i=1;

//prepair list

$html .= '<ul><li>';

while($list = db_fetch_object($qry)){



$html .= '<a>'.$list->name.'</a><div style="height:0px;"></div>';

if($i%6==0){



$html .='</li><li>';

}

$i++;

}

$html .='</li></ul>';

return $html;
Clicking on a name displays its details on next page.
Now my requirement is that i want to display the selected record on next page at the top of the list and rest coming after this record.

I am not getting a way to achieve this!

Please suggest me someway of doing this!
Thanks
No comments posted yet

Your Answer:

Login to answer
301 Like 45 Dislike
Previous forums Next forums
Other forums

How can I Compare two xml documents?
Hi all,

I am doing a POC for my project and I am using XE database 10g version.

Floating Point Precision Loss
I'm writing a program to draw a three-dimensional cube (with a corner cut off) without using any 3D

Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?

C++ Http request?
Code: string Response = "LOGIN_UNSUCCESSFUL"; System.Net.WebRequest request = Sy

iterating through an array and escape each value independently.
I have a set up where the variable being escaped is an array and it needs to be iterated and escaped

Perplexing problem showing a .jpg
Please disregard..........I figured it out

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

Call Screen statement Error
Dear Experts,

is there any setting that needs to be done before creating any dialog progr

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash