JSFiddle - React, Tailwind, and code Playground
by ason5861_cs
HTML
<div id="collapse4" class="body">
<table id="" class="table table-bordered table-condensed table-hover table-striped dataTable">
<thead>
<tr>
<th style='width:7%'>No</th>
<th class='filter_text_field'>Name</th>
<th class='filter_text_field'>Folder Location</th>
<th class='filter_text_field'>Category</th>
<th class='filter_text_field'>Request By</th>
<th class='filter_text_field'>Date Request</th>
<th class='filter_text_field'>Status</th>
<?php if ($module_user_permission['edit'] == 1) { ?>
<th style='width:15%'>Action</th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
$colors = array (
1 => "blue", //--> for all colors within the range of 100-199
2 => "red", //--> for all colors within the range of 200-299
3 => "yellow", //--> for all colors within the range of 300-399
4 => "purple", //--> for all colors within the range of 400-499
5 => "green" //--> for all colors within the range of 500-599
);
$stmt = 'Rules:<br>
1 => "blue" //--> for all colors within the range of 100-199
2 => "red" //--> for all colors within the range of 200-299
3 => "yellow" //--> for all colors within the range of 300-399
4 => "purple" //--> for all colors within the range of 400-499
5 => "green" //--> for all colors within the range of 500-599
';
foreach($rs_wtp['name'] as $name => $valuetocheck){
$check = $valuetocheck[0];
$stmt .= '<td style="color:';
foreach ($colors as $key => $color){
if($check == $key){
$stmt .= $color;
}
}$stmt .=...