Re: Trim a string
| From: | Kyle Mathews | Date: | Sun, 06 May 2001 20:57:36 +0000 |
| Subject: | Re: Trim a string | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51662@lists.php.net to get a copy of this message | ||
Thanks, that worked great.
- Kyle
""Jack Dempsey"" <dempsejn@georgetown.edu> wrote in message
news:NEBBKBGAMLPMIDAJEALPOECLCHAA.dempsejn@georgetown.edu...
> if you're string is a variabe $address, then
> eregi("http://",$address) will tell you if
> they've put in the http part,
and
> $address = substr("$address",7);
> will slice off and store the text after the http://
>
> you'll find lots of different ways to do this...whatever suits you, go for
> it...
>
> -jack
>
> -----Original Message-----
> From: Kyle Mathews [mailto:kyle@thedip.net]
> Sent: Sunday, May 06, 2001 4:46 PM
> To: php-general@lists.php.net
> Subject: [PHP] Trim a string
>
>
> Hello:
>
> I have a signup form that asks for a website address.
> I don't need them to put in the http://, but I'm
> thinking that some will
try
> anyway.
> Is there a way to check for this and remove it when the user submits the
> form?
>
> Thanks,
> Kyle
> kyle@thedip.net
> http://www.thedip.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>