Re: [PHP] Integer

2013-02-01 Thread tamouse mailing lists
On Fri, Feb 1, 2013 at 10:40 PM, Ron Piggott ron.pigg...@actsministries.org wrote: In the following the “2.” means a moderator response and “25” is the account # of the moderator. ?php $author = 2.00025 ? How can I get the 25 by itself? - I want to drop the “2.” and

Re: [PHP] Integer

2013-02-01 Thread Adam Richardson
On Fri, Feb 1, 2013 at 11:40 PM, Ron Piggott ron.pigg...@actsministries.org wrote: 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? I would recommend turning it into a string, splitting the string at the

Re: [PHP] Integer

2013-02-01 Thread tamouse mailing lists
On Fri, Feb 1, 2013 at 11:27 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Fri, Feb 1, 2013 at 10:40 PM, Ron Piggott ron.pigg...@actsministries.org wrote: In the following the “2.” means a moderator response and “25” is the account # of the moderator. ?php $author =

Re: [PHP] Integer Overflow Error

2007-06-21 Thread Tijnema
On 6/21/07, Suhas Pharkute [EMAIL PROTECTED] wrote: Hi, I tried to search on this mailing list and I saw the bug was reported and fixed. I am using PHP 4.4.7 and GD 2 The error that I am getting is at statement $img_t = imagecreatetruecolor(100,100);* Fatal error*: Possible integer overflow

Re: [PHP] Integer Overflow Error

2007-06-21 Thread Jochem Maas
Suhas Pharkute wrote: Hi, I tried to search on this mailing list and I saw the bug was reported and fixed. I am using PHP 4.4.7 and GD 2 you make it sound like there is only one bug. The error that I am getting is at statement $img_t = imagecreatetruecolor(100,100);*

Re: [PHP] Integer Overflow Error

2007-06-21 Thread Robert Cummings
On Thu, 2007-06-21 at 18:16 +0200, Tijnema wrote: On 6/21/07, Suhas Pharkute [EMAIL PROTECTED] wrote: Hi, I tried to search on this mailing list and I saw the bug was reported and fixed. I am using PHP 4.4.7 and GD 2 The error that I am getting is at statement $img_t =

Re: [PHP] Integer Overflow Error

2007-06-21 Thread Suhas Pharkute
Ok, I am sorry, but not sure what do you mean here? Is there any error? If so it will not even run the code Suhas On 6/21/07, Jochem Maas [EMAIL PROTECTED] wrote: Suhas Pharkute wrote: Hi, I tried to search on this mailing list and I saw the bug was reported and fixed. I am using PHP

Re: [PHP] Integer Overflow Error

2007-06-21 Thread Jochem Maas
Suhas Pharkute wrote: Ok, I am sorry, but not sure what do you mean here? the feeling is mutual. it's rather like I asked you what color the sky is ... and you answered 'yes'. Is there any error? If so it will not even run the code Suhas On 6/21/07, Jochem Maas [EMAIL PROTECTED]

Re: [PHP] Integer question

2007-03-23 Thread Tijnema !
On 3/23/07, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, March 22, 2007 2:33 pm, Tijnema ! wrote: 2). How do you handle numbers that large, while maintaining precision. keep them as strings - and/or use a 64bit machine? a 64bit machine would make the number larger, not unlimited :)

Re: [PHP] Integer question

2007-03-22 Thread Tijnema !
On 3/22/07, Matt Carlson [EMAIL PROTECTED] wrote: When dealing with large numbers inside of php, I know at the int limit, a variable is recast into float. 1). How do you return the true number of the float when it reaches the upper limits of mysql's bigint (9223372036854775807). 2). How

Re: [PHP] Integer question

2007-03-22 Thread Jochem Maas
Matt Carlson wrote: When dealing with large numbers inside of php, I know at the int limit, a variable is recast into float. 1). How do you return the true number of the float when it reaches the upper limits of mysql's bigint (9223372036854775807). I can't see how that is possible,

Re: [PHP] Integer question

2007-03-22 Thread Tijnema !
On 3/22/07, Jochem Maas [EMAIL PROTECTED] wrote: Matt Carlson wrote: When dealing with large numbers inside of php, I know at the int limit, a variable is recast into float. 1). How do you return the true number of the float when it reaches the upper limits of mysql's bigint

Re: [PHP] Integer question

2007-03-22 Thread Jochem Maas
Tijnema ! wrote: On 3/22/07, Jochem Maas [EMAIL PROTECTED] wrote: Matt Carlson wrote: When dealing with large numbers inside of php, I know at the int limit, a variable is recast into float. 1). How do you return the true number of the float when it reaches the upper limits of

Re: [PHP] Integer question

2007-03-22 Thread Richard Lynch
On Thu, March 22, 2007 2:33 pm, Tijnema ! wrote: 2). How do you handle numbers that large, while maintaining precision. keep them as strings - and/or use a 64bit machine? a 64bit machine would make the number larger, not unlimited :) Even GMP (or BC) isn't unlimited... It's just limited

RE: [PHP] Integer - boundary?

2005-09-07 Thread Shaw, Chris - Accenture
-Original Message- From: Gustav Wiberg [mailto:[EMAIL PROTECTED] Hi there! What is the boundary for an integer? seems to be a easy question, but I can't find it... /G http://www.varupiraten.se/ According to the manual, The size of an integer is platform-dependent,

Re: [PHP] Integer - boundary?

2005-09-07 Thread Gustav Wiberg
- Original Message - From: Shaw, Chris - Accenture [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED]; PHP General php-general@lists.php.net Sent: Wednesday, September 07, 2005 5:03 PM Subject: RE: [PHP] Integer - boundary? -Original Message- From: Gustav Wiberg [mailto

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
Gustav Wiberg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] - Original Message - From: Shaw, Chris - Accenture [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED]; PHP General php-general@lists.php.net Sent: Wednesday, September 07, 2005 5:03 PM Subject: RE: [PHP

Re: [PHP] Integer - boundary?

2005-09-07 Thread M. Sokolewicz
Subject: RE: [PHP] Integer - boundary? -Original Message- From: Gustav Wiberg [mailto:[EMAIL PROTECTED] Hi there! What is the boundary for an integer? seems to be a easy question, but I can't find it... /G http://www.varupiraten.se/ According to the manual, The size

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
M. Sokolewicz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip or, easier, simply make this script: ?php echo PHP_INT_MAX; ? and you're done :P The maximum integer value is stored in PHP_INT_MAX as of 4.4.0 and PHP 5.0.5 before that, you had to use a way as the one Brian

Re: [PHP] Integer - boundary?

2005-09-07 Thread Gustav Wiberg
Thanx for the scripts! :-) Appreciated! /G http://www.varupiraten.se/¨ - Original Message - From: Brian P. O'Donnell [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Wednesday, September 07, 2005 5:53 PM Subject: Re: [PHP] Integer - boundary? M. Sokolewicz [EMAIL PROTECTED

RE: [PHP] Integer to decimal value.

2002-12-09 Thread John W. Holmes
I know this seems easy, but I can't get it to work for the freaking life of me. I have number that is an integer, lets say 15, and I need it to be 15.00, for a monetary value. I've casted every which way to no avail. www.php.net/number_format ---John W. Holmes... PHP Architect - A monthly

Re: [PHP] Integer to decimal value.

2002-12-09 Thread Doug Parker
excellent. thanks. John W. Holmes wrote: I know this seems easy, but I can't get it to work for the freaking life of me. I have number that is an integer, lets say 15, and I need it to be 15.00, for a monetary value. I've casted every which way to no avail.

RE: [PHP] integer to string

2002-06-14 Thread Lazor, Ed
Try: $n = $soils[$i]; $soils[$i] = sprintf(%d, $n); and if that doesn't work, print out $soils[$i] to see what it is. -Original Message- $soils[$i] = sprintf(%d, $soils[$i]); But doesn't seem to work, my program returned an error. P.S. : I'm using 4.0.6 otherwise wouldn't have

Re: [PHP] Integer in PHP

2002-01-22 Thread Sukumar S.
Hi, Use intval(2.05); I hope this will do the needful for you. with regards, Sukumar .S On Mon, 21 Jan 2002, Jerry wrote: Date: Mon, 21 Jan 2002 13:35:34 - From: Jerry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] Integer in PHP Hi, I'm new in PHP, coming from

Re: [PHP] Integer in PHP

2002-01-21 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 21-01-02 at 14:34 * Jerry said Hi, I'm new in PHP, coming from JavaScript. In JavaScript you had the function parseInt which was really useful. For example parseInt(2.05) will return 2... How can I do that in PHP ? Look up

Re: [PHP] Integer in PHP

2002-01-21 Thread val petruchek
intval (2.05); Valentin Petruchek (aki Zliy Pes) http://zliypes.com.ua mailto:[EMAIL PROTECTED] - Original Message - From: Jerry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 21, 2002 3:35 PM Subject: [PHP] Integer in PHP Hi, I'm new in PHP, coming from JavaScript.

Re: [PHP] integer checking problem from query string

2001-04-28 Thread Philip Olson
It's a string, not an integer. Try using is_numeric() instead. To see what type it is, do this : echo gettype($phonenumber); // prints string You may want to strip all non-numbers first, just in case they enter : 333-333- Something like : $phonenumber =

RE: [PHP] Integer division

2001-01-19 Thread Boget, Chris
What is the syntax for dividing 7 by 2 and getting 3; not 3.5? you can use: $intVar = ((int)( 7 / 2 )); Chris

Re: [PHP] Integer division

2001-01-19 Thread Marcelo Gulin
Hi Todd! if $a = 3.5 then echo (int)$a // print 3 regards Marcelo Gulin Todd Cary escribi: What is the syntax for dividing 7 by 2 and getting 3; not 3.5? Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To