Page 1 of 1

Pass Array from Zend Dom Query Results to table

Posted: Mon Nov 04, 2013 7:23 pm
by pana4219
Hello all,

I am querying a URL for columns YEAR, RATING and I want to insert those two into a database. E.g.
YEAR RATING
1992 9.2
2000 9
1999 8
. .
. .
. .
. .

So, I am writing script like:

$url = 'BLA BLA ';
$data = file_get_contents($url);
$dom = new Zend_Dom_Query($data);
$year = $dom->query('.secondaryInfo');
$rating = $dom->query('.ratingColumn');

How to insert both of them in a database???

for ( .... What do I have to write here?)

$parse = new Application_Model_Parse();
$parse->createImdb(array(
'rating' => What do I have to write here?
'year' => What do I have to write here?
));

Any help will be useful.

Thank you