Jump to content

if criteria is met echo text question


webguync

Recommended Posts

Hi,

 

I have some code, which echos' out two different things if a percentage criteria is met.

 

[php
<td><?php
  if(($pcnt[$i]*100) > 89)
  {
      echo "<div class='passed'>" .Passed."</div>";
  }
  else
  {
      echo "<div class='failed'>" .Failed. "</div>";
  }
?></td>
[/code]

 

I want to create another echo further up the page that displays something if the result is echo "<div class='failed'>" .Failed. "</div>

 

can I do that if this criteria is not met yet? If so how? Let me know if I need to clarify anything.

Link to comment
https://forums.phpfreaks.com/topic/195479-if-criteria-is-met-echo-text-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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