I would like to know how to retrieve the title of a row based on its id.
Its for href link based of next and previous buttons. The id will be determined by
current id-1= previous id ($pid) and current id+1=next id ($nid)
I have $nid
and $pid
, but now i want to get the title of that respective id in the database. Now i am getting only the current id title displayed in the url..
href="features/headlines/<?php echo $pid; ?>/<?php echo $title; ?>"
i want the $title
to show the title corresponding to the $pid
but now i am only getting the title of the current id.
I tried <?php echo $pid[title]; ?>