Answers for "php explode on character"

PHP
2

php explode new line

$values = preg_split('/\r\n|\r|\n/', $myString);
Posted by: Guest on February-06-2021
1

php explode

<?php
 // php explode function => converting text into array 
$str = "Hello world. It's a beautiful day.";
print_r (explode(" ",$str)); // here we define space for breaking we can change space with particular, commna or etc
// results ['hello','world.','It's','a','beautiful','day.']

?>
Posted by: Guest on August-24-2021

Browse Popular Code Answers by Language