use of explode function in php code example
Example 1: php explode
$colors = "red,blue,green,orange";
$colorsArray = explode(",", $colors);
Example 2: explode in php
$str = 'one two three four';
$numbers4 = explode(' ',$str);
Example 3: h:i:s explode in php by ":"
$duartion = explode(":","12:23:34");
$duration_hour = $duration[0];
$duration_minute = $duration[1];
$duration_second = $duration[2];
echo $duration_hour." ".$duration_minute." ".$duration_second;