請檢查我的代碼,我發現了以下的輸出:PHP如何陣列數據保存到數據庫
in wood that 1
in wood that 2
in wood that 3
in wood that 4
從下面所示的代碼,我想這四行是存儲在我的MySQL數據庫。
$string = "imperfection in wood that 1 can appear during the wood drying process.imperfection in wood that 2 can appear during the wood drying process.imperfection in wood that 3 can appear during the wood drying process.imperfection in wood that 4 can appear during the wood drying process";
preg_match_all('/(imperfection)(.*?)(can)/', $string, $matches);
foreach($matches[2] as $value)
echo $value.'<br />';
$sql="INSERT INTO string_check(st_name)VALUES($value)";
$result=mysql_query($sql);
感謝&親切的問候,
是的作品....謝謝魯迪...... – Reel 2012-07-13 00:32:30