title: PHP - Convert HTML ul list into json format
body: <p>I would like to convert an HTML ul list into a json format.</p>
  
  <p><strong>The html list is in this format:</strong> </p>
  
  <pre><code>&lt;li&gt;&lt;span class="orgname"&gt;Adams Center Free Library&lt;/span&gt; &lt;span class="status"&gt;Closed&lt;/span&gt;&lt;/li&gt;
  
  &lt;li&gt;&lt;span class="orgname"&gt;Weight Watchers Watertown&lt;/span&gt; &lt;span class="status"&gt;Delayed&lt;/span&gt;&lt;/li&gt;
  </code></pre>
  
  <p>I'd like it to be in a json format like this:</p>
  
  <pre><code>{
    "meta": {
      "closed_count": "1",
      "delayed_count": "1"
    },
    "list": [
      {
        "data": {
          "orgname": "Adams Center Free Library",
          "status": "Closed"
        }
      },
      {
        "data": {
          "orgname": "Weight Watchers Watertown",
          "status": "Delayed"
        }
      }
    ]
  }
  </code></pre>
  
  <p>Can someone help me out with this?</p>