title: insert xml data to mysql with simpleXML
body: <p>I have to insert data from xml to database, but i have a problem with this specific data</p>
  
  <pre><code>&lt;specifications&gt;
      &lt;attribute_group name="attributeGroup1"&gt;
          &lt;attribute name="attribute1"&gt;                   
              &lt;value&gt;value1&lt;/value&gt;
          &lt;/attribute&gt;
          &lt;attribute name="attribute2"&gt;                   
              &lt;value&gt;value2&lt;/value&gt;
          &lt;/attribute&gt;
          &lt;attribute name="attribute3"&gt;                   
              &lt;value&gt;value3&lt;/value&gt;
          &lt;/attribute&gt;
      &lt;/attribute_group&gt;
  &lt;specifications&gt;
  </code></pre>
  
  <p>I need to insert into database something like</p>
  
  <pre><code>INSERT INTO specs (attr_group,attr_name, attr_value) VALUES ('$attr_group','$attr_name', '$attr_value')
  </code></pre>
  
  <p>Problem is that i dont know how to create foreach for this.</p>