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
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
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
),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
4 matches
Mail list logo