Tuesday, 10 June 2014

str_split() function

PHP : str_split() function-

"The str_split() function is define as it's splits a string into an array"

Syntax-

str_split(string_name, split_length)











For example-























Output-


Array ( [0] => W [1] => e [2] => l [3] => c [4] => o [5] => m [6] => e [7] => [8] => t [9] => o [10] => [11] => m [12] => a [13] => k [14] => e [15] => r [16] => s [17] => o [18] => f [19] => w [20] => e [21] => b [22] => . [23] => c [24] => o [25] => m) Array ( [0] => Welc [1] => ome [2] => to m [3] => aker [4] => sofw [5] => eb.c [6] => om )


Posted by Amit Tiwari




No comments:

Post a Comment