title: PHP variables in classes
body: <p>I have the following code (I'm a Dot Net developers and I thought if I can bring my OOP knowledge to PHP)</p>
  
  <pre><code>class user {
      var $_un;
      function user($un) {
       $_un = $un;
      }
      function adduser() {
      }
      function checkuser() {
      }
      function printuser () {
          echo $_un;
      }
  }
  
  $newuser = new user('Omar Abid');
  $newuser-&gt;printuser();
  </code></pre>
  
  <p>So the problem is simple "$_un" is empty!! I want it to be filled, when the class is created using the constructor and then saved.</p>
  
  <p>I used to do that in C# .net, but here it doesn't work for some reasons.
  Thanks!</p>