Write a PHP script to split the following string

chunk_spilt():-

The chunk_split() function splits a string into a series of smaller parts.


code:-

<?php
$str= 'hello'; 
echo substr(chunk_split($str, 2, ' '), 0, -1);
?>

output:-

he ll o

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post