Here I have a set of arrays that print out data in column format, it works fine. What I am having trouble with is the proper syntax for adding an if statement to enable or disable the writing of a particular array if their value meets a condition. Here is my code I'm using to print the columns of data.
foreach ($looper as $key => $value) {
echo '<tr><td>'
. implode('</td><td>', $wages_out[$key]) .
'<td>' . implode('</td><td>', $ss_out[$key]) .
'<td>' . implode('</td><td>', $pension_out[$key]) .
'<td>' . implode('</td><td>', $rental_out[$key]) .
'<td>' . implode('</td><td>', $inv_out[$key]) .
'<td>' . implode('</td><td>', $rider_out[$key]) .
'<td>' . implode('</td><td>', $other_out[$key]) .
'</td></tr>';
}
echo "</table>";
The if statement should look something like this..
if($wages_t != '0.00'){
. implode('</td><td>', $wages_out[$key]) . }
and I need the if statement for each array above. Im doing this to prevent the array from printing if their are no real values in it. I fooled around with the structure for a while but keep getting errors, it doesn't like the if statement in there and any way i try to nest it just won't work. Any help tackling this would be great. Thank you.