title: Convert list into an array using php. How?
body: <p>I have a function called <code>listelements()</code>, which outputs text like <code>&lt;li&gt;text1&lt;/li&gt;&lt;li&gt;text2&lt;/li&gt;</code>.</p>
  
  <p>I have more than 500 elements. Now I want to convert it into an array.</p>
  
  <p>Can anyone help me? Thanks.</p>
  
  <p>Note: I'm using php</p>
  
  <h2>Update:</h2>
  
  <p>The thing i want to achieve is alphabetical navigation. As of now my function displays links in list order. Instead of that i want to hold that in an array. Then i would like to filter them using characters. </p>
  
  <pre><code>$valid_characters = range( 'a' , 'z' );
  $valid_numbers = array(1,2,3,4,5,6,7,8,9,0);
  </code></pre>
  
  <p>When the user click "A" i would like to display only links start with A.
  Hope this explanation helps you guys for better understanding my question</p>