PHP Tutorial : Explode function to split words

Have you faced with a situation where you needed to split some words separated by spaces ? The explode() php function will help you in this task. Have a look at how it works :

<?php
$words = “some words needed to split”;
$wordsarray = explode(” “, $words);
print_r($wordsarray);
?>

This will not work if you have comma separated words, periods,…………….

Read PHP Tutorial : Explode function to split words »