Sorry that should have been a quoted string:

$mobileNumber = "07855555555";

For the strlen and substr.


-----Original Message-----
From: Chris Scott [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 20, 2008 1:15 PM
To: php-general@lists.php.net
Subject: [PHP] RE: [SPAM] [PHP] format mobile number
Importance: Low

Something like:

$mobileNumber = 07855555555;
$lastTen = substr($mobileNumber, strlen($mobileNumber) - 10);
$formatedNumber = "0" . $lastTen;

-----Original Message-----
From: joaquinbordado [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 20, 2008 12:15 PM
To: php-general@lists.php.net
Subject: [SPAM] [PHP] format mobile number
Importance: Low


my input  mobile is 9051231223....what i want to do is get the last 10
digit
of mobile number and append 0 at the beginning. can someone help me with
that..
-- 
View this message in context:
http://www.nabble.com/format-mobile-number-tp18027538p18027538.html
Sent from the PHP - General mailing list archive at Nabble.com.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to