I select a column 'status' from my db that holds 3 ints. i will want the 0,1,2 to echo hello, goodbye, whatever to the user once they are on the page.
0 = hello
1= goodbye
2= whatever
i cant find any examples of how you echo this with php.
Ive seen loads of examples that just give cold code for $var = 1 $var= hello... etc . I cant see how this fits into a real example.
So far i select the column and the status will echo but with a 1 in front of staus 0 and a 1 at end of status 1 .
echo "<td>".( $row["status"]==0 ? : 'Hello' ). ( $row["status"]==1 ? : 'Goodbye' ) ."</td>";
Table result
Status:
hello1
hello1
hello1
1goodbye
hello1
1goodbye