i'm probably make a really stupid mistake, but i can't find it.
i'm trying to return an array, and it just isn't working.
the count of $temp_array is 33 which is the correct number it should be, the count of $dropdown_array is 1. what am i doing wrong?
<?php
function dropmaker($stuff) {
require '../connect.php';
$dropdown_query = "SELECT $stuff FROM maps_sku_groups GROUP BY $stuff;";
$dropdown_result = mysqli_query($link, $dropdown_query);
while ($data = mysqli_fetch_array($dropdown_result)) {
$temp_array[] = $data[$stuff];
}
echo count($temp_array);
return array($temp_array);
}?>
<?php
$dropdown_array[] = dropmaker('cyclecount');
echo count($dropdown_array);
?>