html - php variable in style (width) attribute -
i have php echo, , use variable width attribute avoid needing if statement. tried use code:
<?php echo variable; ?> it didn't work.
here code:
echo "<div class='progress-bar progress-bar-success' role='progressbar' aria-valuenow='25' aria-valuemin='0' aria-valuemax='100' style='width: (variable)'>";
does work:
echo "<div class='progress-bar progress-bar-success' role='progressbar' aria-valuenow='25' aria-valuemin='0' aria-valuemax='100' style='width: ".$variable."'>";
Comments
Post a Comment