Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
PHP Code:
$var="26"; $first=$var[0]; // $first=2 $second=$var[1]; // $second=6
A string is nothing more than an array of character.
You can access anyone of them by using the index. Just remember than an index start from 0, not 1 in PHP
__________________
Only a biker knows why a dog sticks his head out the window.
|