so i have used a datatable in codeigniter that show all row[] arrays that i have queried now my problem is that, how can i put a condition statement inside a row[] array i have tried every possible way that it could fit but an error would state that i could not define an if statement inside the row[] here is my code:
foreach ($list as $foo_app) {
$ApplicationNo++;
$row = array();
$row[] = $foo_app->ApplicationNo;
$row[] = $foo_app->UserId;
$row[] = $foo_app->FirstName.''.$foo_app->LastName;
$row[] = $foo_app->PlateNo;
$row[] = $foo_app->DateApplied;
$row[] = if (.$foo_app->Status_Application. === "In-Active") {
<b class="w3-padding w3-gray w3-hover-white w3-round-xxlarge">
}
elseif (.$foo_app->Status_Application. === "Accepted") {
<b class="w3-padding w3-green w3-hover-white w3-round-xxlarge">
}
elseif (.$foo_app->Status_Application. === "Denied") {
<b class="w3-padding w3-red w3-hover-white w3-round-xxlarge">
};
$row[] = '<div style="text-align: center;">₱'.$foo_app->AmountFinanced.'</div>';
Aucun commentaire:
Enregistrer un commentaire