its a simple piece of code but i seem to be having problems
this is the code below
- $comp_tot="76";
- if ($credits = $comp_tot)
- //$sub=$credits_3;
- $tot="76";
- $ans_1= $tot-$credits;
- echo"<p>$ans_1</p>";
- echo "there";
this code is working however i dont want the condition to be an equal sign
i want when credits is less that 76 for the code to give me back a number which is the difference between the 76 and the value which is stored in credits. like i said it works as it stands now but i want the condition to be a less than equality. can anyone enlightened me on how to do this please
thanks