php split string
<?php
// It doesnt get any better than this Example
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
echo $pieces[0]; // piece1
echo $pieces[1]; // piece2
php split string
<?php
// It doesnt get any better than this Example
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
echo $pieces[0]; // piece1
echo $pieces[1]; // piece2
explode example in php
$str = "Hello, kinjal, how, are, you";
// it will convert string to array
$s1 = explode(",", $str);
echo "<pre>";
print_r($s1);
php implode
$arr = array('Hello','World!','Beautiful','Day!');
echo implode(" ",$arr);
// Outputs: 'Hello World! Beautiful Day!'
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;
php implode
$colors = array("red","blue","green");
$colorsCSV= "'".implode("','",$colors)."'";
//$colorsCSV: 'red','blue','green'
explode in php
<?php
$str = "Hello world. It's a beautiful day.";
$split = explode(" ",$str);
$hello = $split[0];
$world = $split[1];
?>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us