php - Converting array to individual variables -


i using simplehtmldom parse webpage , extract data , put in mysql database. extracted data , put in array problem facing how convert array variable may use in database query insert record in specific fields. want convert array individual variables

here code

<?php      include("simple_html_dom.php");       $html = file_get_html('abc.html');        $sched = array();      foreach ( $html->find('tr[class=highlight-darkgrey]') $event ) {          $item['title'] = trim($event->find('td', 1)->plaintext);           $sched[] = $item;     }      var_dump($sched); ?> 

and output

array (size=6)  0 =>   array (size=1)   'title' => string 'network admin, field engineer, engineering analyst, sales  executive, pa hr director required telecommunication company' (length=124)  1 =>   array (size=1)   'title' => string 'karachi, hydrabad, lahore, rawalpindi, peshawar, multan, faisalabad' (length=67)  2 =>   array (size=1)   'title' => string '5 - 6 years' (length=11)  3 =>   array (size=1)   'title' => string 'knowledge of field' (length=18)  4 =>   array (size=1)   'title' => string '' (length=0)  5 =>   array (size=1)   'title' => string '- salary , incentives not full , final. can discussed on final interview. 

can please me in achieving it. in advance

well, if needs go in specific fields can this:

insert table_name (column1, column2, column3,...) values ($sched[0]['title'], $sched[1]['title'], $sched[2]['title'],...); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -