Jump to content

[SOLVED] Configuring Account Balance's


jschofield

Recommended Posts

Hello all,

I have a file that has money balance's in it. What I am trying to do is format the file so that anything with a balance of .$.01 - $2.00 is named a "Low" balance. Everything with a $-.01 or less is a "Negitive" balance and the even ($0.00) balances will be thrown out. Below is what I have came up with so far but does not work of course. Can anyone help me please? This has been a drawn out deal for me and I just cant get it. Thanks for all the help everyone. I really appriciate it. Johnnie

 

if (($vals[4] + 0) < 0) {

$balancetype = "Negative";

$negcount ++;

} else {

$balancetype = "Low";

$lowcount ++;

Link to comment
Share on other sites

just some minor corrections/additions:

 

<?php

$lowcount = 0;
$negcount = 0;
$normcount = 0;
$dropped = 0;

if($vals[4] >= .01 || $vals[4] <= 2){
         $balancetype = "Low";
         $lowcount ++;
}elseif($vals[4] < 0){
         $balancetype = "Negative";
         $negcount ++;
}elseif($vals[4] == 0){
         $balancetype = 'Zero';
         $dropped++;
}else{
         $balancetype = 'Normal';
         $normcount++;
}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.