[Solved] sql stores text string as “Array”


It’s normal. When you do :

$codering = ['RF-013.12'];

Is same as :

$codering = array('RF-013.12');

So if you try to use your array like string, php write array instead.

If you wanna store [something] (a string with [] character) you need :

$codering = "[something]";

If you realy need to store an array, ou can serialize him.

Example :

serialize

string serialize ( mixed $value )

or

json_encode

string json_encode ( mixed $value [, int $options = 0 [, int $depth = 512 ]] )

solved sql stores text string as “Array”