A common question, but other answers aren't always clear, so I apologise if this has cropped up elsewhere a million times.
Simple; I have null values returning in my array from a query, I want to cycle through and replace them with zero. I've been trying with the following code;
$stat = $db->getUserStats($id, $code, $mod1, $mod2);
foreach ($stat as $key => $value) {
if ($value == null) {
$value = 0;
}
};