I was wondering if there was a function that lets you separate the letters in a single word string , either to an array or another string with separators.
Thanks
separating letters in a string
Moderator: General Moderators
-
brendandonhue
- Forum Commoner
- Posts: 71
- Joined: Mon Sep 25, 2006 3:21 pm
Does this help?
Code: Select all
<?php
$string = 'Hello, world!';
echo $string{0};
?>well what i was looking for was a function that would break a string into an array of letters so :
however that helps alot
Code: Select all
<?php
$var = "hello";
$letters = array ( 'h', 'e', 'l', 'l', 'o');
?>