Can anyone tell me how I can include the if statement inside this echo? I need my while statement to keep producing results and I need an efficient way to insert the if statement into this code after div class poster, can someone give any suggestions?
while($row = $stmt->fetch(PDO::FETCH_ASSOC)){
echo '
<div class="wrapper">
<div class="submissions">
<div class="logo-logo"><h2>Question.</h2>
<div class="checkboxes">'.$row['formtype'].'
</div>
</div>
<div class="top-submit">
“'. $row["actual_quote"] . '”
</div>
<div class="poster">- '. $row["poster"].'
if(isset($row3['voted'])){
if(isset($row3['ip'])){
echo "You have already voted for this.";
}
}
else{
echo "<form action = '' method = 'post'> <input type = 'submit' name = 'like' value = 'like'> <input type = 'submit' name = 'dislike' value = 'dislike'></form>";
}
<div class = "like">
</div>
<div class = "dislike">
</div>
</div>
<!-- use select to get the items to stay on the page-->
</div>
</div>
</div>
';
}