Hi,
I have a database with 50 fields the first being the table id and the other 49 numbered 1 to 49.
In these numbered fields can be 3 different integers either a 0,1 or 2.
0=NA
1=Pass
2=Fail
I want to echo the results of the tables so instead of echoing "0" I want it to echo "NA".
I am currently carrying out three IFS like below, but this would be a massive page of php if I had to do it for every field numbered 1 to 49.
$el1 = $auditRow["1"];
IF ($el1=='0'){ $el1='N/A'; }
IF ($el1=='1'){ $el1='Pass'; }
IF (substr($el1,0,1)=='2'){ $el1='Fail'; }
Hope you can help!?
Thanks for looking