我从文本和图像的表单输入中收集了两个数组
$final = array($info, $paths);
print_r($final);
这打印
Array ( [0] => Array ( [0] => '1995', [1] => 'chevrolet', [2] => 'impala', [3] => '5.7', [4] => 'bose', [5] => '165465', [6] => 'sadfasdf', [7] => '', [8] => '', [9] => 'asdfasdasdf', [10] => '', [11] => '', [12] => 'sdafasdfasd', [13] => '', [14] => '', [15] => '', [16] => '', [17] => 'asdfasdf', ) [1] => Array ( [0] => 'images/picture22677.png', [1] => 'images/picture22678.png', [2] => 'images/picture22679.jpg', ) )
完美的!但是我现在如何将此$final
数组转换为这样的单个字符串
'$value', '$value', '$value', '$value',
但是没有数组键号来更好地理解我,我需要一个字符串,我可以像这样最终插入 mysql
mysql_query("INSERT INTO
auto(year, make, model, engine, sound_system, mileage, att1, att2,
att3, att4, att5, att6, att7, att8, att9, att10, att11, att12, att13, att14, att15, picture1,
picture2, picture3, picture4, picture5, picture6, picture7, picture8, picture9,
picture10, picture11, picture12)
VALUES
($finalpaths));
请参阅VALUES ($finalpaths));
此处是我需要将数组列表转换为在这种情况下可以使用的字符串的地方
我希望你明白我的需要,感谢任何输入:)