I have a code PHP
that causes an array to become jSON
<?php
$imagens = array('imagem1.jpg', 'imagem2.jpg', 'imagem3.jpg');
$json = json_encode($imagens);
$inserir = mysql_query("INSERT INTO table VALUES ('$nome', '$descricao', '$foto', '".$json."'));
?>
But when I run this query, PHP returns me:
You have an error in your SQL syntax; check the manual that correspond to your MySQL server version for the right syntax to use near '72249.jpg \ ", \" 66462.jpg \ ", \" 84186.jpg \ ", \" 96462.jpg \ ", \" 80447.jpg \ "] \")' at line 1
I have this problem, but I do not know what it can be.