Jump to content

It is printing the Result twice


salgergawi
 Share

Recommended Posts

I do not know what is wrong:

it is printing:-  $remains= ($country->country_unit) - ($country->sold_units) ;

however i have not written echo only inside the tag <td> echo $remains;

                    <?=
                        $remains= ($country->country_unit) - ($country->sold_units) ;
                        if($remains<300 && $remains!=0){
                    ?>
                    <td style="text-align: center; background-color: darkred; color: wheat">
                        <?php }    else { ?>
                     <td style="text-align: center">
                        <?php
                        }
                        echo $remains;
                        ?>
                     </td>

what is wrong why is the variable printing its result alone?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...