I've following statement:
<?php
echo "
<div class='rbt'>
".($rebate_no != 0)."
echo '</br><hr>';".
<div style='overflow:auto' class='well'></div>";
?>
What's the error isn above code. I played a lot for single quotes and double quotes but still the error is not resolved. Please help me in this regard.
What about this?
printf(
'<div class="rbt">
%s
<div style="overflow: auto" class="well"></div>
</div>',
$rebate_no != 0 ? '<br><hr>' : ''
);
Use this below code,
<?php
echo "<div class='rbt'>".($rebate_no != 0)?"</br><hr>":"";
echo "<div style='overflow:auto' class='well'></div>";
?>
When you write all your code like that it will get sloppy better do it this way:
<div class="rbt">
<?php if(rebate_no != 0) { ?>
<br /><hr>
<?php } ?>
<div style="overflow:auto" class="well"></div>
echo "<div class='rbt'>".($rebate_no != 0) ? ."<br /><hr>". : ''."<div style='overflow:auto' class='well'></div>";