 <p>You're trying to ceil an array, you can do it on a numeric value.</p> <p>Try editing your query like this:</p> <pre><code>$query = "SELECT COUNT(id) AS tot FROM actiongame"; </code></pre> <p>And then your PHP code like this:</p> <pre><code>$total_records = $row['tot']; </code></pre>