I want to add dropdown in pagination so that if there is more then 10 pages it will be stored in dropdown so that any one can select any page from it.
Here is my php code which show this output: 1 2 3 4 5 6 7 8 9 10 11........... 100
$sql = "SELECT * FROM `new_data`";
$rs_result = mysqli_query($con,$sql);
$total_records = mysqli_num_rows($rs_result); //count number of records
$total_pages = ceil($total_records / $num_rec_per_page);
echo "<a href='View.php?page=1'>".'|<'."</a> "; // Goto 1st page
for ($i=1; $i<=$total_pages; $i++) {
echo " <a href='View.php?page=".$i."'>".$i."</a> ";
};
echo " <a href='View.php?page=$total_pages'>".'>|'."</a> ";//Goto last page
Output i want : 1 2 3 4 5 6 7 8 9 10 dropdown(contains all pages 11 to 100)