Jump to content

gustaav

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gustaav's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yes, it really works with str_replace(). It is a regional configuration issue then! Thanks a lot! But, is there another way to change the regional configuration of the website? I'm telling you this because I have several pages with decimal operations and it will take me really long to apply str_replace in all pages... In the other hand, I mentioned before that in the past all pages work fine, so, somehow the regional configuration changed.
  2. Ok, I add the code and this is what displays: string(3) ",75" Looking at this it might be regional issues because I'm in Guatemala, it should be displaying ".75" instead ",75" don't you think?
  3. Pay no attention of that... of course is "$row", I must accidentally erase the "$". The code would be: $credits = $row['CREDITS']; if($credits==0) echo 'NONE'; else echo $credits; It has to bee a PHP or IIS issue, i tried to reinstall another PHP version, but the problem remains! Would it be a php.ini configuration?
  4. Yes, exactly! It should be true, but it returns false! As I said before, this works well before! I don't know why it suddenly stops working! It appears to be variable operation issues... $credits = row['CREDITS']; if($credits==0) echo 'NONE'; else echo $credits; For this code, i assign a value to the $credits variable through a database connection. If the value of the variable is 0.75, it displays "NONE". The strange thing is that if i print the "row['CREDITS']" value it prints "0.75", but if i print the $credits value it prints "0"!
  5. I have a really strange problem!!!! I need urgent help for this! I have a PHP Website running on IIS 6 and there are several operations with decimal variables. The problem is that somehow, the operations with all decimals doesn't work well. It truncates all decimal numbers and because of that, every operations in the site crashes!!! For example if i have $value = 0.0;, if i do the operation $value += 1.75; the variable value when printing would be "1". Other example is when I make comparisons. If i write the if statement if ($value != 0) and the variable value is 0.75... it returns true!!! The rare thing is that all operations works well in the past... about a month ago, this starts to fail! Please I really need help! Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.