Answer the question
In order to leave comments, you need to log in
Why is the syntax wrong?
I'm trying to write a code that will determine by the link what Title and Description displays on the page. But in all compilers and on the site it gives a syntax error on the last line of the code or the entire final file.
<div class="valign-cell-wrapper mythemes-header-mask" style="background: rgba( <?php echo mythemes_tools::hex2rgb( esc_attr( $header_mask_color ) ); ?>, <?php echo floatval( $header_mask_opacity ); ?> );">
<div class="valign-cell">
<div class="row">
<div class="col-lg-12">
<?php
$a=$_SERVER['REQUEST_URI'];
if (strpos($a,'/en/') !== false) {
echo '<a class="header-title" href="45" rel="nofollow" title="11">11</a>';
echo '<a class="header-description " href="45" rel="nofollow" title="11">12</a>';
} elseif (strpos($url,'/be/') !== false) {
echo '<a class="header-title" href="45" rel="nofollow" title="12">21</a>';
echo '<a class="header-description" href="45" rel="nofollow" title="12">22</a>';
} elseif (strpos($url,'/de/') !== false) {
echo '<a class="header-title" href="45" rel="nofollow" title="13">31</a>';
echo '<a class="header-description" href="45" rel="nofollow" title="13">32</a>';
} else {
echo '<a class="header-title" href="45" rel="nofollow" title="14">41</a>';
echo '<a class="header-description" href="45" rel="nofollow" title="14">42</a>';
?>
</div>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question