Answers for "php implode and explode functions"

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
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

Browse Popular Code Answers by Language