while($row = mysql_fetch_row($result)){
preg_match('#<span id="lblNumerZgloszenia" style="font-weight:bold;font-style:italic;">([^<]*)<\/span>#',$row[1],$matches);
$query2 = 'UPDATE content_pl SET kategoria_data='.$matches[1].' WHERE id='.$row[0].';';
mysql_query($query2);
}
内容を配列preg_match
に入れるためにこれを行っています。を実行すると正しい結果が表示されますが、を使用すると、ブラウザはそのようなインデックスがないと通知します。span
$matches
print_r($matches)
$matches[1]
編集:print_r
ショー
[...]Array ( [0] => TOW: (210) 252250, (220) 01-07-2002 [1] => TOW: (210) 252250, (220) 01-07-2002 ) Array ( [0] => TOW: (210) 252251, (220) 01-07-2002 [1] => TOW: (210) 252251, (220) 01-07-2002 ) Array ( [0] => TOW: (210) 252252, (220) 01-07-2002 [1] => TOW: (210) 252252, (220) 01-07-2002 ) Array ( [0] => TOW: (210) 252253, (220) 01-07-2002 [1] => TOW: (210) 252253, (220) 01-07-2002 )[...]