In my studies here with arrays I'm trying to highlight only the odd values (leave bold), but I'm not understanding how to do this. Below is what I did, but it prints both bold and normal numbers.
<?php
$matriz = array(
array(50, 35, 44),
array(25, 11, 32),
array(53, 95, 78)
);
foreach ($matriz as $v1) {
foreach ($v1 as $v2) {
echo $v2, ' '; // imprime todos valores com espaço
if ($v2 & 1) { // se for impar
echo '<b>', $v2, '</b>';
}
}
echo '<br/>';
}
?>