请检查我的代码,我发现了以下的输出: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