RE: [PHP] Get a specified amount of text?
| From: | Rick Emery | Date: | Thu, 28 Mar 2002 13:04:59 +0000 |
| Subject: | RE: [PHP] Get a specified amount of text? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90509@lists.php.net to get a copy of this message | ||
string substr (string string, int start [, int length])
-----Original Message-----
From: Donald [mailto:impronta_leggermente@hotmail.com]
Sent: Saturday, March 23, 2002 5:08 PM
To: php-general@lists.php.net
Subject: [PHP] Get a specified amount of text?
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"
Thanks
-Donald
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php