I am trying to store this div in a PHP variable, like given below
<div class="col-xl-12 col-xs-12 icon-div" style="height: 15vw; display: flex; align-items: right; justify-content: center; margin: auto; padding-left: 0px;padding-right: 0px;" >
<a class="fa-pos" href="https://m.facebook.com/<?php echo $facebook ?>"> <i class="fab fa-facebook-square fa-3x" style="color: #3b5998;" ></i> </a>
<p class="user-id-display"> <?php echo $facebook; ?> </p>
<a href="https://m.facebook.com/<?php echo $facebook ?>" class="myButton">Open</a>
</div>
as given below
<?PHP $facebook_html='<div> "the html code above..." </div>' ?>
then echo the HTML like <?PHP echo $facebook_html; ?>
the HTML and style works fine but the PHP code inside doesn't work, it simply printing the PHP code