I'm trying to fill in a string in an array value that has a empty ''
do I need to use isset or empty to check it first?
Here is my code
echo table();
function table() {
$a = array ('0' => array('Jan de Boer', '213','440'),
'1' => array('Gerda Severin','214','442'),
'2' => array('Jean Dubois','215',''),
'3' => array('Peter Geringh','221','449'),
'4' => array('ricardo','666','666'));
echo "<table border='6px'>
<tr><th colspan='3'>Alle werknemers</th></tr>
<tr><th>Naam</th>
<th>kamer</th>
<th >Toestelnummer</th></tr>";
for ($x=0;$x<5;$x++){
echo "<tr>";
for($y=0;$y<3;$y++){
echo "<td>",$a[$x][$y].'</td>';
}
echo "</tr>";
}
echo "</table>";
}
It needs to fill in the blank ''
like a string unknown.