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

Email Form Syntax Issue
I need the TO: in email to display To: CEO instead of To: abc@mail.com

How to alter the scri

Else statement screws up all css
Does anyone know what goes wrong in the process with this php code?
This code seems to be causing

get font info from a font file
hello,

Does anyone know how to get font info from a font file ... using php of course !
<

Get Total From While Loop
I'm trying to get the total for each product and add them for a Grand Total to list outside the loop

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

Dynamically allocating the number of rows in a table based on a variable value
Hi,
I have situation here which i cannot resolve, I have a variable temp which stores the num

Help to integrate whois Domain Details to website
Hi,

can i know is their any php script r methods to add domain details to my website.

What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor

need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for

Ajax Error since Upgrading to 3.5
Ever since upgrading my site to .NET 3.5 (I needed LINQ), I've been getting this annoying error on o

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