I have seen a lot of answers which cant really answer to what i need.
Let´s suppose that i have a database with commentaries of users. I wanna limit the commentaries to 10 per page [I know how to make the sql query and limit the results but i still can't figure out how to build the code] The problem is that i dont know how to make the pagination as it can be seen in the next image:
https://i.stack.imgur.com/J7sRt.png Thanks.
This is what i have written:
require("con.php");
$Mystring="SELECT commentaries FROM mydb WHERE 1 LIMIT 25";
$runQuery=mysqli_query($link,$Mystring);
$Myrow=mysqli_num_rows($runQuery);
$commentary=$Myrow['commentaries'];
if($Myrow>=1){ //If there is at least 1 commentary it will be displayed
echo $commentary;
}