Jump to content
Xander

PHP+CSS+MYSQL : Meniu + Submeniu Dinamic

Recommended Posts

Posted

Iarta-ma ca te bate un vector in php :) daca citeai cap coada output-ul la print_r nu cred ca aveai mare problema sa intelegi....

dai ca parametru un vector

fiecare element din vector este la randul lui vector care:

1. elementul de pe index-ul 0 este linkul tatalui

2. orice alt element este alt submeniu, daca submeniul contine doar un singur element(index 0) atunci nu mai se creaza un submeniu ci ramane doar un element


[tata]->
[0] = "linktata"
[fiu1] ->
[0] ="link fiu1"
[fiu1a] ->
[0] = "link fiu1a"

output o sa fie un meniu pe 3 nivele ...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...