title: Insert CSS in PHP if statement
body: <p>I am using PHP to determine if a user is on a mobile device or desktop browser. Right now I have the statement set to echo a "yes" or "no." Those are both functioning correctly. However, I want to add certain CSS code if the device is mobile and certain CSS code if it is not. Is this possible?</p>
  
  <p>Here is an example:</p>
  
  <pre><code>$ismobile = check_user_agent('mobile');
  if($ismobile) {
      &lt;div id="slider1"&gt;
           Sample Text
          &lt;/div&gt;
  
  } else {
      &lt;div id="slide2"&gt;
          Sample Text 2
          &lt;/div&gt;
  </code></pre>
  
  <p>Thanks!</p>