nested php tages
Posted: Fri Jun 19, 2009 3:14 am
Hi
I have the following code which I fee has too many php tags and would like to know if it can be simplified a bit.
thanks
sorry, I could not find out how to make the code more colorful to read easily.
I have the following code which I fee has too many php tags and would like to know if it can be simplified a bit.
thanks
Code: Select all
<div id="page">
<?php if ($sel_page) { ?>
<h2><?php echo htmlentities($sel_page['menu_name']); ?></h2>
<div class="page-content">
<?php echo strip_tags(nl2br($sel_page['content']), "<b><br><p><a>"); ?>
</div>
<?php } else { ?>
<h2>
<?php
echo "Welcome to " . BUSINESS_NAME; // stored in functions.php
?>
</h2>
<?php } ?>
</div>