Posted by Michael Fesser on 07/06/07 12:00
..oO(Kevin Raleigh)
>If I remember correctly their was a string function in C that allowed my to
>target a particular element in a string so that I could verify it's
>authenticity. I think it was
>strCharAt();
>
>I would like to check the first element of a string:
>$myString = 'asdf';
>How can I check the first letter of this string?
Use an array-like syntax to access each char in a string:
$myString[0]; // first char 'a'
$myString[3]; // last char 'f'
Then for further checking the character type functions might be of
interest.
XVII. Character Type Functions
http://www.php.net/manual/en/ref.ctype.php
Micha
[Back to original message]
|