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

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -