I have multiple HTML file.
I want to display this file content in modal box base on condition.
I do not want to use iframe and javascript or jquery.
So It is possible from php side only?
Example:
<div class="modal fade bd-example-modal-lg shopify-onload-popup" id="defaultPopup-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<?php
if ($variable == 1) {
?>
<!-- Loade file1.html -->
<?php
} else {
?>
<!-- Loade file2.html -->
<?php
}
?>
</div>
</div>
</div>
2
Answers
Why an html template? Include a php page instead of html with include
you can use PHP include function like this