Answer the question
In order to leave comments, you need to log in
How to save Array to MySQL database correctly?
Javascript forms an array of the form
[manufacters] => Array
(
[51] => Array
(
[7] => Array
(
[name] => Производитель 1
[id] => 7
[model] => 51
[count] => 1
[date] => 2015-10-23 00:00:00
)
)
)
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[null,null,null,null,null,null,null,{"name":"Производитель 1","id":"7","model":"51","count":"0"}]]
Answer the question
In order to leave comments, you need to log in
Ugliness! Use not an array, but the simplest and most banal object.
{
22 : {
one : "something",
two : "yet something"
},
35 : {
one : "something",
two : "yet something"
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question