title: Div class inside echo PHP
body: <p>I try to put div class in the echo but it does not work really well. The coding is for to change the login button to the username button after user login. The username button will have the drop-down which is the div class. Other things are work well in this coding except for the div class drop-down. Is there another way to put the div class in the echo? Any thought??</p>
  
  <p><a href="https://i.stack.imgur.com/t5Gae.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t5Gae.png" alt="enter image description here"></a></p>
  
  <p>This is before login</p>
  
  <p><a href="https://i.stack.imgur.com/Ngxck.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ngxck.png" alt="enter image description here"></a></p>
  
  <p>What I expected after Login </p>
  
  <p><a href="https://i.stack.imgur.com/yB1Pg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yB1Pg.png" alt="enter image description here"></a></p>
  
  <p>What I get after Login</p>
  
  <p>Below is my coding:</p>
  
  <pre><code>&lt;div class="header-right"&gt;
      &lt;?php
          if (isset($_SESSION['login_user'])) {
              echo '&lt;a class="active" &gt;&lt;img src="image/user.png" width="22" height="22"&gt; '.$login_session.' &lt;img src="image/drop.png" width="20" height="20" &gt; &lt;/a&gt;';
              echo '&lt;div class="box dropdown"&gt;
              &lt;ul&gt;
               &lt;a ""&gt;edit&lt;/a&gt;
                &lt;a ""&gt;delete&lt;/a&gt;
                &lt;a id="logout" href="logout.php"&gt;Log Out&lt;/a&gt;
              &lt;/ul&gt;
            &lt;/div&gt;';
          } else {
              echo '&lt;a class="active" href="login.php"&gt;&lt;img src="image/lock.png" width="20" height="20"&gt; Login&lt;/a&gt;' ;
          }
      ?&gt;
  &lt;/div&gt;
  </code></pre>