Re: Chopping off extra characters from input

From: Date: Mon, 12 Nov 2001 16:33:54 +0000
Subject: Re: Chopping off extra characters from input
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74300@lists.php.net to get a copy of this message
> I've got a problem where people are entering extra characters (due to an > inonsistency in the tracking numbers they are being given) in a number > they are entering in a form field. I have a PHP script querying a MySQL > database. What's the easiest way to take the input and use only the > first 8 characters? > > Any help is appreciated! > > Thanks, > Rory $tracking = substr($input,0,8); Would be as easy as I can think of. * Chris O'Brien (clobrien@excel.net) * Excel.Net,Inc. - http://www.excel.net/ * (920) 452-0455 - Sheboygan/Plymouth area * (888) 489-9995 - Other areas, toll-free

« previous php.general (#74300) next »