I'm really new to php and am having trouble debugging the following snippet.
<?php
$hintMaintain = <<< EOT
<hr />
<div id="user_hint"> ABC DE <span class="status_strtolower($account['status_value'])">ucfirst($account['status_value'])</span>FGH</div>
<div style="margin: 0px 74px 0px 74px; text-align: center; height: 66px; width:66px; background: url('img/strtolower($maintain)hint.png') no-repeat;">
<span style="line-height: 66px; font-size: 36px; color: black;">$countdown</span>
</div>
EOT;
eval("\$hintMaintain = \"$hintMaintain\";");
?>
<!-- SOME HTML -->
<?php echo $hintMaintain; ?>
This shows a server error. I haven't been able to work this out.
Help? Thanks.
Try:
<?php
$hintMaintain = '<hr />
<div id="user_hint">
<p> ABC DE
<span class="status_'.strtolower($account['status_value']).'">'.ucfirst($account['status_value']).'</span>
FGH</p>
</div>
<div style="margin: 0px 74px 0px 74px; text-align: center; height: 66px; width:66px; background: url(\'img/'.strtolower($maintain).'hint.png\') no-repeat;">
<span style="line-height: 66px; font-size: 36px; color: black;">'.$countdown.'</span>
</div>';
?>
<!-- SOME HTML -->
<?php echo $hintMaintain; ?>
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