I am working in a Drupal template. I want to know if two variables exist, and if they do not then do or show something else. I know how to do this for only one variable, but what is the correct syntax to look for two? My code is below.
<?php if (!empty($right) && !empty($left)): ?>
<div id="content-main">
<?php endif; ?>
I also tried it this way.
<?php if (!empty($right)&&($left)): ?>
<div id="content-main">
<?php endif; ?>
and this way.
<?php if (!isset($right)&&($left)): ?>
<div id="content-main">
<?php endif; ?>
None of them work, how do I fix this?
if (isset($right) && isset($left))otherwise makevar_dump($right,$left);and check the content of the variables<?php if (empty($right) && empty($left)): ?> <div id="content-main"> <?php else: ?> <?php endif; ?>