Vedana Vedana - 4 months ago 12
HTML Question

1 row if statement in PHP

sorry if this question is too simple but I can't figure it out on my own and I could use some help.

Basicly I've got this line of code:

$column_data_ar[] = (string)$employee_ar['functie'].$row = (!empty($row['functie_2']).'<br>'.$employee_ar['functie_2']);

And I want


only to be posted when the column functie_2 is something else than NULL/Empty.

Thanks ahead for any replies!


what's with

$row =(!empty($row['functie_2'])) ? '<br>'.$employee_ar['functie_2'] .'</br>' : '';

You could look at this page to learn more about the Ternary Operator.