Hello all,
I’m trying to get a font awesome class to display depending on the what’s in my string value $teacher[‘gender’] using an if statement.
I tried the following:
[php] if($teacher[‘gender’] == “F”)
{
<i class="fa fa-female fa" aria-hidden="true"></i>
}[/php]
…but I got this error:
Parse error: syntax error, unexpected ‘<’ in….
The following works however, but it’s not really what I want to achieve:
[php] <?php
if($teacher[‘gender’] == “F”)
{
echo “person is female”;
print ("");
…
[/php]
Any help on how to apply the class would be great.
Thanks for reading.
Best regards,
Jool