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>
you can use PHP include function like this
<?php
if ($variable == 1) {
include "file1.php";
} else {
include "file2.php";
}
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With