In PHP we can easily break a long string into smaller parts by using the explode() function of PHP. In run rime, this function works like this:
$longstring=”Most of the time Amrit is confused — OK, not most of the time”;
$brokenstring=explode(” “, $longstring);
After the execution of the second command the variable $brokenstring is an array such that,
var longstring=”Most of the time Amrit is confused — OK, not most of the time”;
var brokenstring=longstring.split(” “);
Now the variable brokenstring has all those words.