Join WhatsApp ChannelJoin Now

PHP Explode All Character into Array Example

Hi Dev,

Today, i we will show you PHP explode all character into array example. This article will give you simple example of PHP explode all character into array example. you will learn PHP explode all character into array example. So let’s follow few step to create example of PHP explode all character into array example.

Example:

<?php
    $name = "Mohan";

    $arr = str_split($name);
  
    print_r($arr);
  
?>

Output:

Array
(
    [0] => M
    [1] => o
    [2] => h
    [3] => a
    [3] => n
)

Recommended Posts