I am using php to build my website. but there is many if condition in my php code and if condition isset than i want to show some div in html.
<?php if(isset($checkbox1)){ ?>
<div class="btn_simple hidden-xs category align_center col-xs-12 col-md-2 col-md-pull-10 ">
<div class="side-header">Filter</div>
<form method="GET">
<div>
<strong><?php echo $checkbox1 ?></strong> <input style="width: 50px;" name="<?php echo $checkbox1 ?>" type="checkbox"><
br>
</div>
<div class="col-md-offset-1"> <strong> <?php echo $checkbox1?></strong> <input style="width: 50px;margin-right: -6px;" name="<?php echo $checkbox2 ?>" type="checkbox"><br> </div>
<input style="margin-right:-27px;" type="submit" name="submit" value="submit"><br>
<?php if(isset($_GET['submit']) ){ ?> <a style="margin-right: -27px;width:64px;" class="btn btn_all_images" href="?<?php echo $s_value_1 ?>=&<?php echo $s_value_2 ?>=&submit=submit">All</a>
<?php } ?>
</form>
</div>
<?php } ?>
In this code I have to write:
<?php if(isset($checkbox1)){ ?>
<?php } ?>
Is there any short way to do it ?