Answers for "how to convert values of an array into array using php explode"

PHP
2

explode example in php

$str = "Hello, kinjal, how, are, you";

    // it will convert string to array
    $s1 = explode(",", $str);
    echo "<pre>";
    print_r($s1);
Posted by: Guest on September-29-2021
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

Code answers related to "how to convert values of an array into array using php explode"

Browse Popular Code Answers by Language