salgergawi Posted January 4 Share Posted January 4 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 More sharing options...
Ingolme Posted January 4 Share Posted January 4 <?= is equivalent to an echo statement. You should remove the = sign. 1 Link to comment Share on other sites More sharing options...
salgergawi Posted January 4 Author Share Posted January 4 Thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now