|
Posted by www.phpbasic.com on 11/03/07 17:44
On Nov 4, 12:41 am, Paul Herber
<SubstituteMyFirstNameH...@pherber.com> wrote:
> On Sat, 03 Nov 2007 17:37:58 -0000, "www.phpbasic.com"
>
> <w2a...@gmail.com> wrote:
> >i have a problem with interger number in PHP
> ><?php
> >class read{
> > var $num;
> > function read($num){
> > $this->num = $num;
> > }
> > function basic(){
> > print "NUM: ".($this->num);
> > }
> >}
> >$read = new read(001002);
> >$read->basic(); // Output string: NUM: 514
>
> 001002 is an octal number.
> and 001002 octal = 514 decimal
> so remove any leading zeros first.
>
> --
> Regards, Paul Herber, Sandrila Ltd.http://www.sandrila.co.uk/ http://www.pherber.com/
Thanks, Paul Herber
[Back to original message]
|