title: How to build dynamically an array - add values in loop
body: <p>A question from PHP self-learner.</p>
  
  <p>My question is how can one dynamically build an array.</p>
  
  <p>I have an array of some class values</p>
  
  <pre><code>$tags;
  </code></pre>
  
  <p>a class <strong>tag</strong> has a field called <strong>Text</strong>;</p>
  
  <p>I need to build an array of strings populated from that field</p>
  
  <p>NOTE for downvoters.
  I am not PHP developer. I just need to do one simple task. I just do not know how to
  dynamically build an array of strings. That is my question. Hope this question will help other people who are learning PHP.</p>