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

need help to creat database
Hello Team, please guys i am stuck from three days with paypal issue for IPN but no luck yet now i w

utl_file open error
i have file in the unix path

Path /popdev01/pop/popdevb/tfi/

File name

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

Trying to add functions to table
I have this list of characters and I'm trying to figure out what I have to do to put the results of

extract data
Code: <div class="post hentry uncustomized-post-template">

DateObject and Nulls
Hi all,

I have an array mapped to a value object. One of the items in the array is a PHP Date

onClick='location.href=index.htm'> not working
Below is my code:

echo "<input type='button' value='redirect' onClick='location.h

Request-URI Too Large
I have created a simple submit form for a mysql database that puts a piece of code into database.<

Connecion issue
Hi,

For some reason, I keep getting this error when trying to connect:

Warning: mysql_

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

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