I have the following function that is returning the category name
function getcategories()
{
global $mysqli;
$sql = "select dndo_busi_cat_name from tbl_dndo_busi_cat";
if(!$result = $mysqli->query($sql)){
die('There was an error running the query [' . $db->error . ']');
}
$row = $result->fetch_all(MYSQLI_ASSOC);
return ($row);
}
my called function is
$data=getcategories();
i have checked the return function using var_dump($data), it is returning the array but when i try to get the output using $data['categoryname']; i am not getting any thing.