Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php string to char array

<?php

$str = "Hey Arkadaş";

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

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

?>

/*
Rasult:
  Array
(
    [0] => H
    [1] => e
    [2] => y
    [3] =>
    [4] => A
    [5] => r
    [6] => k
    [7] => a
    [8] => d
    [9] => a
    [10] => �
    [11] => �
)
Array
(
    [0] => Hey
    [1] =>  Ar
    [2] => kad
    [3] => aş
)*/
Comment

PREVIOUS NEXT
Code Example
Php :: convert object to array laravel 
Php :: remove repeated columns laravel 
Php :: laravel collection each 
Php :: prestashop get all products 
Php :: codeigniter query builder order by 
Php :: laravel get next record 
Php :: last 6 digits of string laravel 
Php :: if any error in blade laravel 
Php :: php call protected function from child class 
Php :: add another field in existing migration laravel 
Php :: explode function in laravel 
Php :: how to check exist in array in rule validation laravel 
Php :: phpunit stop on failure 
Php :: laravel send ajax 
Php :: Allowed memory size of 1610612736 bytes exhausted 
Php :: laravel append to model 
Php :: how to search in sentence laravel 
Php :: how to run a specific migration in laravel 
Php :: php array common element 
Php :: wordpress global variable not working 
Php :: convert string to array laravel 
Php :: how to get variable from url in laravel 
Php :: current date time in php 
Php :: how to pass variable in inside function into where in laravel 
Php :: laravel blade skip entry 
Php :: get current route in blade laravel 
Php :: Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in 
Php :: case inside laravel query 
Php :: how send parameter with command in laravel 
Php :: get the category wp 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =