Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 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

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,071
    Thanks
    11
    Thanked 96 Times in 94 Posts
    $number should be exactly that a numeric value, what do you see if you
    PHP Code:
    echo $number
    ?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi im sorry i dont quite understand im still kind of a beginner
    could you please rephrase your answer?
    my error code is this
    error in code :(-capture.png

    i navigate to the desired line(not shown in the pic above) which is 238 i see this
    error in code :(-capture2.png

    Thanks for taking your time out to help me

  • #4
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,071
    Thanks
    11
    Thanked 96 Times in 94 Posts
    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)
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •