Re: [PHP] Integer

2013-02-01 Thread tamouse mailing lists
On Fri, Feb 1, 2013 at 11:27 PM, tamouse mailing lists wrote: > On Fri, Feb 1, 2013 at 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 g

Re: [PHP] Integer

2013-02-01 Thread Adam Richardson
On Fri, Feb 1, 2013 at 11:40 PM, Ron Piggott 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 decimal, then scanning the second

Re: [PHP] Integer

2013-02-01 Thread tamouse mailing lists
On Fri, Feb 1, 2013 at 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 >

[PHP] Integer

2013-02-01 Thread Ron Piggott
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

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 PROTECT

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 PH

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 > > > > $i

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 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

[PHP] Integer Overflow Error

2007-06-21 Thread Suhas Pharkute
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 in memory allocation (4 * -91750400 + 0) in *actions.p

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 unli

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 jus

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 >> th

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 (92233

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 poss

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

[PHP] Integer question

2007-03-22 Thread Matt Carlson
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 do you handle numbers that large, while maintaining p

[PHP] Integer question

2007-03-22 Thread Matt Carlson
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 do you handle numbers that large, while maintaining p

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: Sent: Wednesday, September 07, 2005 5:53 PM Subject: Re: [PHP] Integer - boundary? ""M. Sokolewicz

Re: [PHP] Integer - boundary?

2005-09-07 Thread Brian P. O'Donnell
""M. Sokolewicz"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > or, easier, simply make this script: > 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 Bri

Re: [PHP] Integer - boundary?

2005-09-07 Thread M. Sokolewicz
ot;PHP General" Sent: Wednesday, September 07, 2005 5:03 PM 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...

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 Ge

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" Sent: Wednesday, September 07, 2005 5:03 PM Subject: RE: [PHP] Integer - boundary? -Original Messa

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-de

[PHP] Integer - boundary?

2005-09-07 Thread Gustav Wiberg
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/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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. www.php.net/number_forma

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 monthl

[PHP] Integer to decimal value.

2002-12-09 Thread Doug Parker
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. Any help would be greatly appreciated. -- PHP General Mailing List (http://

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

[PHP] integer to string

2002-06-14 Thread Pushkar Pradhan
I generate nos. using range function, e.g. I get 0 to 40. I want to convert these nos. to string, I tried sprintf() syntax: $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 this problem. -Pushkar S. Pra

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

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, > &

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

[PHP] Integer in PHP

2002-01-21 Thread Jerry
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 ? Thanks. Jerry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED

[PHP] Integer size limitations

2001-05-15 Thread Richard Ellerbrock
Please copy me on responses. TIA. I am trying to do some IP address arithmetic using php, but am running into problems because the biggest number that php can handle is 32 bits signed. No good for IP addresses. Try the following: echo 2473473024 & 127; // gives 0 - correct echo 2473

Re: [PHP] integer checking problem from query string

2001-04-29 Thread Steven Haryanto
Because it's a string. You can use regex matching or test whether floor($var) == $var, for example. Steve At 4/29/2001 04:25 AM, Jamie Saunders wrote: >Hi, > >I'm submitting a phone number from an HTML form to a PHP page >that examines it to see if it's an integer: > >form.html: > >validate.ph

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 = preg_replace('/[^0-9]/','

[PHP] integer checking problem from query string

2001-04-28 Thread Jamie Saunders
Hi, I'm submitting a phone number from an HTML form to a PHP page that examines it to see if it's an integer: form.html: validate.php: However, for some reason the script doesn't recognize the number as an Integer - why is this and how can I remedy it? Jamie Saunders Mail: [EM

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/)

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

[PHP] Integer division

2001-01-19 Thread Todd Cary
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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators