title: PHP Simple HTML Dom hyphenated attribute with "find"
body: <p>I cannot get PHP Simple HTML Dom to get data from custom data attributes.  </p>
  
  <p>The code changes I've made just return all kinds of elements and data, and not just the custom data attributes as per the code - eg <code>data-XYZ</code>.</p>
  
  <p>I've read other questions/answers which suggest using <code>{}</code> but I cannot get it working no matter how I structure curly braces around quotes, apostrophes, square braces, etc.  </p>
  
  <p><strong>Example of HTML I'm trying to extract data from:</strong>  </p>
  
  <pre><code>    &lt;!-- Data I want to extract --&gt;
  
      &lt;li class="main-li" 
         data-name="Eric"
         data-info="loves bananas"
         data-address="29 Acacia Road"
      &gt;
  
  &lt;!-- Data I'm actually getting --&gt;
      &lt;div class="float-main"&gt;
         &lt;p class="telephone"&gt;DATA A&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;h3 class="name"&gt;
          &lt;a href="some_link" title="some title"&gt;DATA B&lt;/a&gt;
      &lt;/h3&gt;
      &lt;p class="more-data"&gt;DATA C&lt;/p&gt;
      &lt;p class="address"&gt;DATA D&lt;/p&gt;
  
      &lt;/li&gt;
  </code></pre>
  
  <p><strong>Current usage of Simple HTML Dom:</strong>  </p>
  
  <pre><code>    foreach( $html-&gt;find('[data-name]') as $data ) 
        {
          echo $data-&gt;plaintext;
          echo "&lt;br&gt;";
        }
  </code></pre>
  
  <p>I want the data from the custom attributes in the <code>li</code>:<br>
  data-name<br>
  data-info<br>
  data-address  </p>
  
  <p>What I'm currently getting is DATA A, B, C, D - from the <code>h3</code> link, and the <code>&lt;p&gt;</code> areas.  </p>
  
  <p>If I need to simply use <code>{}</code>. how do I apply those to <code>$html-&gt;find('[data-name]')</code>?  </p>