I have this code where if something then display a link, else display another link. the if and else are php code, and the links are html as you will know, but I was wondering how do you make it so it will not give me any errors, how do I combine php with html?
<?php foreach ($user_socs as $user_soc) {
if ($soca == $user_soc) {
<a href="file.php" class="socbuttons">Leave Society</a>;
} else {
<a href="anotherfile.php" class="socbuttons">Join Society</a>;
}