Hi,
I have a varible called $LINHA[1] ( [1] is the index ) with the value "12345", but I have to access byte-to-byte, that is, "1" than "2", and so far.
How can I do this ?
I've ever tried the function array and settype ...
TIA
Joao Carlos
Help with Array
Moderator: General Moderators
-
bionicdonkey
- Forum Contributor
- Posts: 132
- Joined: Fri Jan 31, 2003 2:28 am
- Location: Sydney, Australia
- Contact:
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
strlen(), substr(), and a for() loop.
Code: Select all
for($i = 0; $i < strlen($string); $i++){
$singlecharacter = subtr($string, $i, 1);
}