Answers for "explode from first 3 characters php"

PHP
3

php split string into array of characters

//Split int char array
$chars = str_split($str);

//Loop each char
foreach($chars as $char)
{
    // your code
}
Posted by: Guest on March-23-2020
0

php explode and get first value

$beforeDot = array_shift(explode('.', $string));
$beforeDot = current(explode(".", $string));

// PHP <= 5.3:
$beforeDot = explode(".", $string);
$beforeDot = $beforeDot[0];
Posted by: Guest on April-17-2021

Code answers related to "explode from first 3 characters php"

Browse Popular Code Answers by Language