Answers for "array to string conversion explode in php"

PHP
1

implode and explode in php

<html>  
<body bgcolor="pink">  
<h3>Implode Function</h3>  
<?php  
$arr=array ('I','am','simple','boy!');  
echo implode(" ",$arr);  
$str="I am simple boy!";  
print_r(explode(" ",$str));  
?>  
</body>  
</html>
Posted by: Guest on September-18-2020
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