10-05-2018, 04:32 AM
If i were you, i would definitely handle this in the function that is drawing the table.
Something like this:
Something like this:
PHP Code:
<tbody>
<?php foreach ($dataArray as $row): ?>
<tr>
<td><?= $row[0] ?></td>
<td><?= $row[1] ?></td>
<td><?= $row[2] ?></td>
<td><?= $row[3] ?></td>
<td>
<?php if ($row[3] == 'failure'): ?>
<button class="disabled" disabled >Push Button</button>
<?php else: ?>
<button class="active" >Push Button</button>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>