CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   error in code :( (http://www.codingforums.com/showthread.php?t=275952)

hash 10-10-2012 01:40 AM

error in code :(
 
can anyone help me with this error please i dont quite understand whats wrong im getting the error Warning: number_format() expects parameter 1 to be double, string given on line 238 of common.htm i go to that line and this is what appears :return number_format($number, 0, '', ','); can anyone help me what am i missing :(:confused:

firepages 10-10-2012 02:18 AM

$number should be exactly that a numeric value, what do you see if you
PHP Code:

echo $number

?

hash 10-10-2012 03:33 AM

2 Attachment(s)
Hi im sorry i dont quite understand im still kind of a beginner
could you please rephrase your answer?
my error code is this
Attachment 11614

i navigate to the desired line(not shown in the pic above) which is 238 i see this
Attachment 11615

Thanks for taking your time out to help me :)

firepages 10-10-2012 04:59 AM

what I mean is that we need to see the value of $number which is getting passed to that function.. so temp change the function to ..

PHP Code:

function prnintg($number){
      echo 
"\$number = {$number}";
      return 
number_format($number,0,'',',');


that may or may not give us a clue to whats happening, you also need to find the part of the code that calls prnintg($someval)


All times are GMT +1. The time now is 04:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.