Convert a string to an array

How to Convert a string to an array in php?
Ankur Rajput
Asked 02-11-2019
47

Answer (1)
<?php $str = "Hello world. It"s a beautiful day."; print_r (explode(" ",$str)); ?> Result: Array ( [0] => Hello [1] => world. [2] => It"s [3] => a [4] => beautiful [5] => day. )
Deepak Sharma
Asked 22-07-2018
45 Likes
Comments
Write comment

Submit your answer