B
B
Browar2018-03-26 15:05:28
PHP
Browar, 2018-03-26 15:05:28

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

1 answer(s)
A
Andreo, 2018-03-26
@Browar

the closing quote in the last else where?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question