[PHP] Extracting first eight characters of a string

2002-11-07 Thread John Meyer
How do I extract only the first eight characters (alpha-numeric) in a string. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Extracting first eight characters of a string

2002-11-07 Thread Adam Voigt
Umm, this won't check, only blindly pull the first 8, but: $cutsring = substr($originalstring,0,8); Adam Voigt [EMAIL PROTECTED] On Thu, 2002-11-07 at 10:06, John Meyer wrote: How do I extract only the first eight characters (alpha-numeric) in a string. -- PHP General Mailing List

RE: [PHP] Extracting first eight characters of a string

2002-11-07 Thread John Meyer
how about this: $cutstring = substr(preg_replace(\W,,$originalstring),0,8); -Original Message- From: Adam Voigt [mailto:adam;cryptocomm.com] Sent: Thursday, November 07, 2002 8:10 AM To: John Meyer Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Extracting first eight characters of a string

Re: [PHP] Extracting first eight characters of a string

2002-11-07 Thread Marek Kilimajer
),0,8); -Original Message- From: Adam Voigt [mailto:adam;cryptocomm.com] Sent: Thursday, November 07, 2002 8:10 AM To: John Meyer Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Extracting first eight characters of a string Umm, this won't check, only blindly pull the first 8, but: $cutsring