Dup of http://stackoverflow.com/questions/330709/some-basic-php-questions#330829
Hello,
I have a heap of tinyint fields in a mysql database I need to show with PHP. At the moment I am doing something like this:
if ($row['PAYPAL_ACCEPT'] == "1"){
$paypal = "Yes";
else
$paypal = "No";
}
For each field, which is tedious and seems like there should be a better way, than using an if clause for each field. If there is, what is it?