开发者

separate a string into multiple queries

Lets say i have a string as so

$string = "12 Days Of Terror";

and i want to break down this string at each space and insert each word into my DB.

the table: tags

Columns: movie, tagname

Value: 10开发者_如何学编程2, $string

how would you write the query for this?


Just split the string using explode: http://php.net/manual/en/function.explode.php and then insert each tag in the table.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜