Re: Get a specified amount of text?

From: Date: Thu, 28 Mar 2002 06:43:28 +0000
Subject: Re: Get a specified amount of text?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90479@lists.php.net to get a copy of this message
On Sat, 23 Mar 2002, Donald wrote: > In Visual Basic there is a function called left. > usage: left(string, len) > It allows you to get the first 'len' characters of 'string'. > > Is there a similar function in PHP? > > I have a value: > "3.405" > That I just want to crop to "3.40" > If I pass "3.405" to MySQL it adds it like this: "3.41" In PHP there is something called the manual. http://www.php.net/substr miguel

« previous php.general (#90479) next »