Source Code :
<div style="overflow-x:auto; height: 400px; font-family: Arial, Helvetica, sans-serif; width: fit-content; margin: 7%;">
<table class="table table-dark table-striped table-bordered border-warning">
<tr>
<th><h4>POCO F3</h4></th>
<td><td><h1>
<?php
$penuh = 100;
$setengah = 50;
$sekarat = 15;
$habis = 0;
$battrai = 0;
for($battrai; $battrai <= 100; $battrai++) {
if($battrai == $penuh){
echo "<hr/> Battrai anda $battrai% Battrai anda penuh 🔋 😁";
break;
} elseif($battrai == $setengah){
echo "<hr/> Battrai anda $battrai% Battrai anda setengah persen ⚡";
} elseif($battrai == $sekarat){
echo "<hr/> Battrai anda $battrai% battrai sekarat perlu dicas segera 😱";
}elseif($battrai == $habis){
echo "<hr/> Battrai anda $battrai% battrai anda sudah habis 📵";
} else { // Jika battrai hp belum mencapai event tertentu maka tidak akan ada
echo "<br/> Battrai Anda $battrai%";
}
}
?>
</h1></td></td>
</tr>
</table>
</div>