Sort records based on country from xml using php -
i have 1 excelsheet write data , export in xml data , got xml format below parse record using php usign below code have 1 country dropdown want display record based on selected country means display record in post using php dropdown,but no parent child relation ship can there way so?
<row> <cell><data ss:type="string">dr. nair</data></cell> <cell><data ss:type="string">12121 brok blvd. </data></cell> <cell><data ss:type="string">west indies</data></cell> <cell><data ss:type="string">wi</data></cell> <cell><data ss:type="number">90025</data></cell> <cell><data ss:type="string">310-444-1212</data></cell> </row> <row> <cell><data ss:type="string">dr. july</data></cell> <cell><data ss:type="string">paldi. </data></cell> <cell><data ss:type="string">west indies</data></cell> <cell><data ss:type="string">wi</data></cell> <cell><data ss:type="number">90025</data></cell> <cell><data ss:type="string">310-4544-1212</data></cell> </row> <row> <cell><data ss:type="string">dr. lol</data></cell> <cell><data ss:type="string">paldi. </data></cell> <cell><data ss:type="string">new zeland</data></cell> <cell><data ss:type="string">nz</data></cell> <cell><data ss:type="number">90025</data></cell> <cell><data ss:type="string">310-4544-1212</data></cell> </row> <row> <cell><data ss:type="string">dr. nik</data></cell> <cell><data ss:type="string">paldi. </data></cell> <cell><data ss:type="string">india</data></cell> <cell><data ss:type="string">in</data></cell> <cell><data ss:type="number">90025</data></cell> <cell><data ss:type="string">310-4544-1212</data></cell> </row> $excel = new xml2003parser('sample.xml'); $table = $excel->gettabledata(); // display instruction echo "<table border=1>"; $data=array(); $data_city=array(); foreach($table["table_contents"] $row){ $data[]=$row['row_contents'][3]['value']; $data_city[]=$row['row_contents'][2]['value']; print_r($data); }
Comments
Post a Comment