example.php
Gesponsorde koppelingen
PHP script bestanden
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
include("succes!.class.php");
function ToonMappenVanArray($array)
{
$mappen = NULL;
foreach($array as $i=>$bestand)
{
if(is_array($bestand))
{
$mappen .= '<li>'.$i.'<ul>';
$mappen .= ToonMappenVanArray($bestand);
$mappen .= '</ul></li>';
}
else
{
$mappen .='<li>'.$bestand.'</li>';
}
}
return $mappen;
}
$builder = new FileNodeBuilder;
$data= $builder->build('./',true);
echo ToonMappenVanArray($data->buildArray());
?>
include("succes!.class.php");
function ToonMappenVanArray($array)
{
$mappen = NULL;
foreach($array as $i=>$bestand)
{
if(is_array($bestand))
{
$mappen .= '<li>'.$i.'<ul>';
$mappen .= ToonMappenVanArray($bestand);
$mappen .= '</ul></li>';
}
else
{
$mappen .='<li>'.$bestand.'</li>';
}
}
return $mappen;
}
$builder = new FileNodeBuilder;
$data= $builder->build('./',true);
echo ToonMappenVanArray($data->buildArray());
?>