When I pull the data from the DB, I want to display the actual select options (Male and Female) on the front instead of figures 1 and 2. How do I do this? Is there any way to do this using any of the conversion functions?
Ben has already given you the answer, but as an extra comment:
Like code generally, the way it's written can make a big difference to its readability. I find ternary operators when nested or with multiple conditions can become very hard to read. Formatting can help a lot, eg: