elianero elianero - 18 days ago 9
PHP Question

PHP/HTML/MySQL Display

im having trouble with my code

Here is the code:

<div <?php if($row['delta_marge']<0){?> class='cel_progress_bar_delta' style='width: <?php echo $progress_bar_delta;?>%'<?php }
elseif ($row['delta_marge']>=$seuil_haut){?> class='cel_progress_bar_delta_orange' style='width: <?php echo $progress_bar_delta;?>%'<?php }
elseif ($delta_marge<$row['delta_marge']<$seuil_haut) {?> class='cel_progress_bar_delta_yellow' style='width: <?php echo $progress_bar_delta;?>%'<?php }?>%'>


I'm having troube with the second "elseif" where i want it to be between two numbers but it doesn't work!
Thanks in advance!

Answer

try this:

elseif ($delta_marge<$row['delta_marge'] && $row['delta_marge']<$seuil_haut)