php
Split string in PHP
<?php
$str = "Make the world a better place";
$parts = explode(' ', $str);
?>
Split the string into an array.
Was this helpful?
Similar Posts
- Split string by new line PHP
- Split array into chunks using array_chunk() PHP
- Check empty string in PHP
- Calculate length of a string using strlen() function in php
- Encode html special characters and real escape string in php
- Convert String date to DATE MONTH-NAME YEAR format php
- String interpolation and formation in PHP