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 :: regex get text between braces 
Php :: sort array php 
Php :: Woocommerce remove add to cart message 
Php :: next year php string 
Php :: laravel where multiple conditions on single colmn 
Php :: php round up 
Php :: laravel update return updated row, laravel update return 
Php :: php curl request 
Php :: laravel 8 foreign key 
Php :: PHP sqrt() Function 
Php :: php remove string from array 
Php :: in laravel date duration validation rule 
Php :: php compute price less discount 
Php :: if browser url is having domain name in it check using php 
Php :: php foreach string in array 
Php :: insert data using seeder in laravel 
Php :: wordpress get post featured image 
Php :: php has constant 
Php :: php static dropdown list example 
Php :: check if the link is image or url php 
Php :: wordpress log errors 
Php :: write test case in react native 
Php :: how to do a submit button in php without reloading the page 
Php :: php datetime add 1 weeek 
Php :: laravel 5 use env variable in blade 
Php :: laravel get mysql column datatype 
Php :: laravel insert array 
Php :: eloquent where parentheses 
Php :: merge array 
Php :: prevent SQL injection in PHP? 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =