Answer the question
In order to leave comments, you need to log in
PHP array working properly and writing it to MySQL?
What would be the correct implementation of writing an array of type 36525,52424,53465,34524 to the database and reading it from there?
Will it be correct through serialize and a text field or are there better ways?
Answer the question
In order to leave comments, you need to log in
Better translate to JSON.
$array = [1,2,3];
$arrayString = json_encode($aray);
See what it's for. If this is a set of data that is only stored in the database and there is no search for it, then store it as you like. If, for example, these are row identifiers of another table and they are needed in JOINs and WHEREs, then they must be stored in separate rows of the associated table.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question