Re: First letter
| From: | George Patterson | Date: | Tue, 27 Apr 2004 23:29:11 +0000 |
| Subject: | Re: First letter | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34129@lists.php.net to get a copy of this message | ||
On Tue, 27 Apr 2004 16:05:32 -0700 (PDT)
"Daniel Clark" <dclark@nwlink.com> wrote:
> $rest = substr("abcdef", 1, 3); // returns "bcd"
>
> http://www.phpbuilder.com/manual/function.substr.php
>
>
> > What PHP function returns just the first letter of a string?
> > - Matt
> >
Or to properly answer the question,
$letter=substr("abc", 0, 1); // returns the first character which is a.
Unless Matt wanted the first letter as opposed to the first character??
George Patterson