title: IF statement inside PHP function not working?
body: <p>This is very basic, I know - but I simply can't figure out why this short section of PHP code isn't working for me? I'm trying to get a IF statement happening in my function, and then execute the function somewhere on my document so it returns "../".</p>
  
  <pre><code>&lt;?php $confirm = "yes"; ?&gt;  
  
  &lt;?php
     function clientarea() {
        if (isset($confirm)) {
           if ($confirm == "yes") {
               echo "../";
           }
        }
     }
  ?&gt;
  
  &lt;img src="&lt;?php clientarea(); ?&gt;images/logo.png" alt="Logo" /&gt;
  </code></pre>
  
  <p>Any ideas why this code doesn't work for me?</p>