We help IT Professionals succeed at work.

Changing Table Data Display

fcruz5
fcruz5 asked
on
202 Views
Last Modified: 2013-12-13
Hi,

I have this table data in PHP:

echo ('<td class=' . $css_class . ' align=default >'.$val[1].'&nbsp</td>');

I want to change all "Y" results to "X" and all "N" results to blank.

Right now it displays like the one the left. I am trying to get it to display like the one on the right.

Y          X
N
Y          X
Y          X
N
N
Y          X

I believe something like the following would work, but I am not sure. Where would I add this into the <td> tags above?

== 'Y' ? 'X' : ''

Comment
Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.