Jump to content

Putting Table into MySQL table


twittoris

Recommended Posts

I am thinking something like this.

 

// Create DOMDocument

$dom = new DOMDocument();

 

// Load html string

$dom->loadHTML($html2);

 

 

// Find all links

foreach($html2->find('table.tblAddr') as $element)

      echo $element->table.tblAddr . '<br>';

or something like this?

 

 

// Get rows from tables

$rows = $tables->item(0)->getElementsByTagName('tr');

 

// Loop over each row

foreach ($rows as $row)

{

Get each column by tag name

$cols = $row->getElementsByTagName('td');

 

 

Echo values (here you can assign them in array for example)

echo $cols->item(0)->nodeValue.'<br />';

 

echo '<hr />';

 

 

 

i need help

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.