Hi Stack Exchange Community,
I'm looking to understand how to insert an IF statement inside the code below:
$html.= '<span class="cat">In <a href="'. $typeLink . '">' . $terms_string . '</a></span>';
Essentially, I would like to insert a glyph just before the hyperlink that changes based on the value of $terms_string (using IF and ELSEIF). I thought the line below might be close to what I need, but I'm unsure if I'm accurately switching between PHP and HTML (definitely user error, but is it a syntax error?).
$html.= '<span class="cat">In '. if($terms_string === "Articles") { glyph HTML code }; .' <a href="'. $typeLink . '">' . $terms_string . '</a></span>';
Any insights would be greatly appreciated.