When I print an array with a string as `$key` and an array as `$value` using `foreach ($array key => value)`, the keys with `null` values are not displayed. Can someone please help me with this?

```
$stockist = array();
while($row = mysql_fetch_array($result)) {   
    $pharmacy = trim($row['pharmacy']);
    if (isset($stockist[$pharmacy])) {
        $medicine = $stockist[$pharmacy];
        $medicine[] = trim($row['pharmacy']);
        $stockist[$pharmacy] = $medicine;
    }
    else {
        $medicine = array();
        $medicine[] = trim($row['medicine']);
        $stockist[$pharmacy] = $medicine;
    }
}

ksort($stockist);
foreach ($stockist as $key => $value) {
    echo "<table align='center' border='1'>";
    echo "<tr><td align = 'justify'> <font color = 'blue'> $key</td></tr>";
    foreach ($value as $key1 => $value1) {
        echo "<tr><td align ='justify'>$value1</td></tr><br>";
    }
    echo "</table>";
}

```