Ok, yeah, you could use a database table, or continue to use the XML file, just assign a number to it based off line number raised by the power of two.
PHP Code:
pow(2, $lineNumber);
As you said that you don't want to use the XML file any more, then just use a database table, and on each result do the same thing with the pow function to show them what the value needs to be.
PHP Code:
<?php
$sql = new mysqli(
'localhost',
'username',
'password',
'database'
);
if ($result = $sql->query($query)) {
$i = 1;
while ($row = $result->fetch_assoc()) {
printf ("%d, %s\n", pow(2, $i++), $row['level']);
}
$result->close();
}
$sql->close();
?>
Something like that ...