I am trying to display the number of rows I have in my database, but instead of the number being displayed on my page I just get the word 'array'
My code is below
$productCountSql = "SELECT COUNT(*) FROM products WHERE `user_id` = '" . $_SESSION['user_id'] . "'"; $productCountResult = mysql_query($productCountSql); $countProducts = mysql_fetch_assoc($productCountResult); echo "<tr><td>Products uploaded:</td><td>$countProducts products</td></tr>";
If anyone can point me in the correct direction that would be great. Thankyou