php - Save SQL column value to an array -


i want save value array. have column called numbers values 1,2,3.

if select value, save variable $value , try put array:

$array = array($value);

but not working properly.

php not automatically convert strings integers. dump showed 1 string, this:

// separate comma array $array = explode("," $str); // array( '1', '2', '3' );  // re-create array, converting strings integers foreach ($array $index => $value) {     $array[$index] = (int)$value;  } 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

.net - Generate assembly with Roslyn -

batch file - filebot superstrict script: need tiny video sample or other solution -