I am wanting to put the percentage of health they have available instead of something like this: 50/100. I want it to show 50%.... But, I can't figure out how mix it together properly...
This is what I've tried:
Code: Select all
<?php
$width = ($row['hpoints'] / $row['maxhp']) * 100;
echo "<img src='images/hpoints.png' width='$width' height='15' . $width . % . >";
?>
EPI
***EDIT***
Have also tried it this way:
Code: Select all
echo "<img src='images/hpoints.png' width='$width' height='15' . '$width' . >";