• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
condition based action should be changed?

#1
I am using table row details with action column  . In this action once process completed show "completed button" otherwise show  edit icon. 

need suggestion.


Attached Files Thumbnail(s)
   
Reply

#2
Simply use if … else …, or the ? : operator.
PHP Code:
<?php 
$actionbutton 
$row['status'] == 'finished' anchor('link1','Completed','class="btn"') : anchor('link2','Edit','class="btn"');
?>

<td><?= $actionbutton;?></td> 
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.