I know, the headline is not very specific, but I dont't know how to title it.
I want to create a list from 1 to 10. All those numbers should be clickable and open a sublist. Again with the numbers from 1-10. Like this:
- 1
- 2
- 1
- 2
- 3
and so on... Here is some code, I've got:
<?php
$num = $_GET['zahl'];
$zahlen = array();
while($num != 0){
$part = $num % 10;
array_push($zahlen, $part);
$num = floor($num/10);
}
foreach ($zahlen as $key => $value) {
$runs = $value + 1;
for ($i=1; $i < $runs ; $i++) {
if ($i == 1) {
echo $ulon . "
";
}
echo $lion . "
";
echo $a . "ordner.php?zahl=" . $i . $amiddle . $i . $aoff . "
";
echo $lioff . "
";
}
for ($i=1; $i < 11 ; $i++) {
if ($i == 1) {
echo $ulon;
}
echo $lion . "
";
echo $a . "ordner.php?zahl=" . $zahlen[0] . $i . $amiddle . $i . $aoff;
echo $lioff . "
";
}
echo $uloff;
echo "
" . "</body>";
?>