This doesn't seem to echo when needed...
Code: Select all
function yburg(){
$num = intval($data[$j][2]);
if ($num == 5){
echo "The PLU number 5 is a Cheesburger";}
}
for ($j = 0; $j < $count2; $j++) {
yburg();
echo $data[$j][2], $data[$j][3], '<br />';
}
Code: Select all
for ($j = 0; $j < $count2; $j++) {
echo $data[$j][2], $data[$j][3], '<br />';
$num = intval($data[$j][2]);
if ($num == 5){
echo "The PLU number 5 is a Cheesburger"}
}
Any help for a newcomer to php?