$sql3 = "SELECT ps.* from posts ps";
$result3 = $conn->query($sql3) or die(mysqli_error());
How can i get the number of rows on that result on php ?
$result3->num_rows
Try searching before asking
Either
$total_rows = mysqli_num_rows ($result3);
or
$total_rows = $result3->num_rows;
will give you the total number of rows from that query. The latter one is the preferred way when doing OO programming.
You read the full API of MySQLi on the PHP website.
Sources:
try this
$conn->affected_rows