salut à tous
j'ai un objet du genre (résultat de requête)
qui traduit l'arborescence suivante
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 0 => array 'idPage' => string '8' (length=1) 'titrePage' => string 'Accueil' (length=7) 'nomLien' => string 'Accueil' (length=7) 'urlSeoPage' => string 'Accueil' (length=7) 'depth' => string '1' (length=1) 'parent' => string '0' (length=1) 'text' => string '<a href="http://demo.local">Accueil</a>' (length=54) 1 => array 'idPage' => string '9' (length=1) 'titrePage' => string 'Société' (length=9) 'nomLien' => string 'Société' (length=9) 'urlSeoPage' => string 'Societe' (length=7) 'depth' => string '2' (length=1) 'parent' => string '8' (length=1) 'text' => string '<a href="http://demo.local/9-Societe">Société</a>' (length=56) 2 => array 'idPage' => string '11' (length=2) 'titrePage' => string 'Activités' (length=10) 'nomLien' => string 'Activités' (length=10) 'urlSeoPage' => string 'Activites' (length=9) 'depth' => string '3' (length=1) 'parent' => string '9' (length=1) 'text' => string '<a href="http://demo.local/11-Activites">Activités</a>' (length=60) 3 => array 'idPage' => string '20' (length=2) 'titrePage' => string 'Partenaires' (length=11) 'nomLien' => string 'Partenaires' (length=11) 'urlSeoPage' => string 'Partenaires' (length=11) 'depth' => string '1' (length=1) 'parent' => string '0' (length=1) 'text' => string '<a href="http://demo.local/20-Partenaires">Partenaires</a>' (length=63) 4 => array 'idPage' => string '21' (length=2) 'titrePage' => string 'COntact' (length=7) 'nomLien' => string 'Contact' (length=7) 'urlSeoPage' => string 'COntact' (length=7) 'depth' => string '2' (length=1) 'parent' => string '20' (length=2) 'text' => string '<a href="http://demo.local/21-COntact">Contact</a>' (length=55)
Accueil |
--- Société |
------ Activités |
Partenaires |
--- Contact
j'aimerai faire une fonction dans laquelle je dise
crée moi le fil d'arianne de la page activités
et la fonction me renvoi accueil > societe > activites
vous voyez le délire ?
ben en fait c'est achement compliqué :'(
il faut partir en sens inverse ... et remonter l'arbre pour ne garder que ce qui m'intéresse...
du coup je sais pas trop
vala vala ..
si qqun à ça sous la main
thanks !
@+
Partager