Answers for "php example of explode array to string"

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
1

explode in php

<?php
$str = "Hello world. It's a beautiful day.";
$split = explode(" ",$str);
$hello = $split[0];
$world = $split[1];
?>
Posted by: Guest on August-13-2021

Browse Popular Code Answers by Language