I have a string in php named $password="1bsdf4";
I want output "1 b s d f 4"
How is it possible. I was trying implode function but i was not able to do..
$password="1bsdf4";
$formatted = implode(' ',$password);
echo $formatted;
I tried this code:
$str=array("Hello","User");
$formatted = implode(' ',$str);
echo $formatted;
Its working and adding space in hello and user ! Final Output I got Hello User
Thanks, yours answers will be appreciated.. :)
$password="1bsdf4"; $formatted = implode(' ', str_split($password)); echo $formatted;