Answers for "php string to array of chars"

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 convert string to chars

<?php

$str = "Hello Friend";

$arr1 = str_split($str);
$arr2 = str_split($str, 3);

print_r($arr1);
print_r($arr2);

?>
Posted by: Guest on April-30-2020
0

string to array php

str_split ( string $string [, int $split_length = 1 ] ) : array
Posted by: Guest on February-24-2020

Code answers related to "php string to array of chars"

Browse Popular Code Answers by Language