RE: [PHP] NH05 to 5, NH07 to 7
| From: | Ford, Mike | Date: | Fri, 26 Nov 2004 11:29:51 +0000 |
| Subject: | RE: [PHP] NH05 to 5, NH07 to 7 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-202887@lists.php.net to get a copy of this message | ||
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
On 25 November 2004 22:11, Wiberg wrote:
> i guess you know a simple solution to convert the string
>
> NH01 into 1
I can think of several.
Oh, you want one? How about:
$x = "NH01";
$n = (int)substr($x, 2);
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211