How to split a word or sentence delimited with slashes,commas, dots, or hyphens
< ?php
// Delimiters may be slash, comma, or hyphen
$data = “Welcome to, the world of php”;
list($first, $second) = split(‘[/,-]‘, $data);
echo “First Letter: $first; Second Splitted letter: $second
\n”;
?>
Incoming search terms:
- javascript split sentences (8)
- splitslashes in php (4)
- preg split sentences (4)
- preg split by comma (4)
- c# split word with hyphen (3)
- split the word and slash in php (2)
- how to split words with hyphens (2)
- php separate by comma or slash (2)
- how to split a word in php (2)
- php preg split hyphen (2)
- how to separate the words using comma in javascript (2)
- preg split hyphen (2)
- preg split first word (2)
- split word in mysql (2)
- php separate sentence with comma (2)
- preg split C# (2)
- sentence of word click event using C# (1)
- Preg split by word (1)
- separate word comma php (1)
- separate words using split in c sharp (1)
- shell script split by slash / (1)
- shell separate sentence (1)
- shell seperate comma hyphen (1)
- simple preg split on comma php (1)
- slash vs comma (1)
- separate the sentence by comma using php (1)
- separate sentence using comma in php (1)
- preg split commas (1)
- preg split php word (1)
- preg split back forward slash php (1)
- preg split slash (1)
- preg split comma (1)
- Search on a sentence in js (1)
- sentences using commas slash (1)
- separate sentence comma shell script (1)
- preg split by hyphen (1)
- slashes vs commas (1)
- split to comma a word in javascript (1)
- split with backslash as a delimiter (1)
- split with dash in javascript (1)
You will also be interested in ,
- Simple Code To Set And Retrieve Cookie Using PHP
- Tag cloud using php, mysql and ajax with filter
- Convert Month Name To Month Number Using Simple php
- Hit counter using php
- Import large files in mysql using PhpMyAdmin
- Send Email to Multiple Persons using php
- Adding Handlers Directly In httpd.conf Of Apache
- Water mark images using PHP 5 and GD Library
- Email address validation using php
- Using no-cache for Stop Caching in Firefox and Internet Explorer

