So as normal PHP query returns an array it's never been explained to me how you actually extract the value from the query out.
$countThemes = Singlequery('SELECT COUNT(1) FROM items WHERE type = :type',
array(':type' => 'theme'), $conn);
This is my query and it returns;
Array
(
[0] => Array
(
[COUNT(1)] => 5
)
)
I need the value 5 so far I've setup this below but I'm not sure what to call because I can't call a column name like a normal Select * query.
<?php foreach ($countThemes as $countTheme) : ?>
<a href="#" class="btn view-all">View All <?= $countTheme['name']; ?></a>
<?php endforeach; ?>