Answers for "explode php with numbers"

PHP
33

php explode

$colors  = "red,blue,green,orange";
$colorsArray = explode(",", $colors);
Posted by: Guest on June-14-2019
0

explode php all values to int

$s = "1,2,3,8,2";
$ints = array_map('intval', explode(',', $s ));
var_dump( $ints );
Posted by: Guest on October-04-2021

Browse Popular Code Answers by Language