へparse
の方法HTML data
PHP array PHP
HTML データ
<div class="test">
<strong>ID</strong>
<a href="a.html" title="a html">123456</a><br>
<label class='label'>Occupation </label>
House wife <br>
<label>Language?</label>
English <br>
<label style="width:50%">Basic Language Knowledge of?</label>
Hindi <br>
<label>Start date</label>
Nov 2013 <br>
<label>Other Info</label>
yes <br>
<label>age</label>
19 <br>
<label>Gender</label>
Female <br>
<strong>Address</strong>
India <br><br>
<p>Hi, <br>
Lorem ipsum doner inut</p>
</div>
私はこれを試しました、
<?php
$html='Let above html to parse';
preg_match_all('/<label\s(.*)>(.*)<\/label>/U',$html,$m);
print_r($m);
// gives all label contents only but I need pair of label text
// and value showing after it
?>
のような出力、
Array('ID'=>123456,'link'=>'a.html','職業'=>'専業主婦','言語?'=>'英語', '基礎言語知識?'=>'ヒンディー語','開始日'=>'2013 年 11 月','その他の情報'=>'はい' ,'年齢'=>'19','性別'=>'女性','住所'=>'インド' ,'description'=>'こんにちは、Lorem ipsum doner inut');
はい、ガノンをforgot to mention
使用していますscraping