Answers for "how to explode and get value in keys in php"

PHP
1

explode in php

<?php
$str = "Hello world. It's a beautiful day.";
$split = explode(" ",$str);
$hello = $split[0];
$world = $split[1];
?>
Posted by: Guest on August-13-2021
0

explode php all values to int

$s = "1,2,3,8,2";
$ints = array_map('intval', explode(',', $s ));
var_dump( $ints );
Posted by: Guest on October-04-2021

Browse Popular Code Answers by Language