Posted by Rich on 05/08/06 21:46
On Mon, 08 May 2006 15:24:02 GMT, Brian wrote...
>
>Hi there
>
>This is probable really easy but I can't find the answer, I want to know
>what the first character is in a string
>
>e.g. string =ABC1234 and i want to return 'A'
>
>Brian
>
>
>
>
>
Based on the information for "substr()" at php.net...
<?php
$string = 'ABC1234';
echo $string{0};
?>
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Navigation:
[Reply to this message]
|