devsheet logo Devsheet
My Feed Posts
Tools
JSON Viewer Javascript Runner Comma Converter HTML Editor SCSS to CSS SQL Formatter Online
PHP Basics
  • Variable and data type in PHP
  • Define constant in PHP
  • Conditions or if else statement in PHP
  • Switch case in PHP
  • For loop php
  • foreach loop php
  • Create function in PHP
  • Date time in PHP
  • String interpolation and formation in PHP
PHP String conversion
  • strtolower() - Convert characters to lowercase
  • strtoupper() - Convert string to uppercase
  • lcfirst() - Lowercase first character of a String
  • ucfirst() - Uppercase first character of a String
  • ucwords() - Uppercase first character of each word of a String
PHP Arrays
  • Define array PHP
  • Add item to array PHP
  • Delete item from array PHP
  • in_array() PHP
  • array_chunk() PHP
  • array_column() PHP
  • Loop through Array of Objects
  • Get random value from an array in PHP
php file operations
  • Check if file exist in PHP
  • Create new file and write data to it using PHP
  • Read file content using PHP
  • Write data to file using PHP
  • Delete a file in PHP
PHP Examples
  • Generate secure tokens using PHP
  • Send POST request without using curl
  • Check empty string in PHP
  • Find the number of days between two dates
  • Convert String to an Integer in PHP
  • Print or echo new line using PHP
  • Display errors if not shown in PHP script
  • Get the values of checkboxes on Form Submit
  • Get and set cookie in PHP
  • Convert HTML code to plain text in PHP
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
Search all posts...
Programmer's Homepage
Your One-Stop Chrome Extension for Curated Developer Feeds, Where Learning and Growth Never Stop!
Connect using Github
  • Sign up
  • Login
Generating new answer. Please wait...