title: PHP trying to create dynamic variables in classes
body: <p>I need to construct a class with alot of variables directly from the Database, For simplicity we'll name them 'userX', I've looked into ORM just a little, but its way over my head.</p>
  
  <p>Essentially I thought I could use my procedural code</p>
  
  <pre><code>for ($i=0; $i&lt;100; $i++) {
  public ${'user'.$i};
  }
  </code></pre>
  
  <p>But, in a class</p>
  
  <pre><code>class test() {
  
    private $var1;
  
    for ($i=0; $i&lt;10000; $i++) {
    public ${'user'.$i};
    }
  
    function __constructor .....
  
  }
  </code></pre>
  
  <p>Obviously not.. but it leaves me with the same problem, how can I add $user0, $user1, $user2, etc etc, without having to type all 10k of them in..</p>
  
  <p>Obviously, it would be 1000x easier to just grab the names from the Database, but again, that looks even harder to code. Should I buckle down and grab them all ORM style? </p>