[PHP] Re: Integer

2013-02-02 Thread Ron Piggott



Thank you for the help.  Very much appreciate it.



Ron Piggott



www.TheVerseOfTheDay.info

-Original Message- 
From: Shawn McKenzie

Sent: Saturday, February 02, 2013 1:43 PM
To: php-general@lists.php.net ; Ron Piggott
Subject: Re: Integer

On 02/01/2013 10:40 PM, Ron Piggott wrote:
In the following the “2.” means a moderator response and “25” is the 
account # of the moderator.




How can I get the 25 by itself?
- I want to drop the “2.” and remove all the zero’s

Would it be best to turn this into a STRING?

Any suggestions?


Ron Piggott



www.TheVerseOfTheDay.info



Yeah needs to be a string:

$author = "2.00025";

list($a, $b) = explode('.', $author);

echo (int)$a . ' ' . (int)$b; 



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



[PHP] Re: Integer

2013-02-02 Thread Shawn McKenzie
On 02/01/2013 10:40 PM, Ron Piggott wrote:
> In the following the “2.” means a moderator response and “25” is the account 
> # of the moderator.   
> 
>  
> $author = 2.00025
> 
> ?>
> 
> How can I get the 25 by itself?  
> - I want to drop the “2.” and remove all the zero’s
> 
> Would it be best to turn this into a STRING?
> 
> Any suggestions?
> 
> 
> Ron Piggott
> 
> 
> 
> www.TheVerseOfTheDay.info 
> 

Yeah needs to be a string:

$author = "2.00025";

list($a, $b) = explode('.', $author);

echo (int)$a . ' ' . (int)$b;


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