Jump to content

Search the Community

Showing results for tags 'multdimational'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. how to populate PHP multidimensional array and add the attributes to the category heading nodes, I have the following Books array $book = array( "language"=> array("English","Franch","Arabic"), "Programming"=> array("PHP","JAVA","C++"), "Science"=> array("Physics","Geography","Math"), ); function treeView($book){ $markUp = ""; foreach($book as $cate => $subj){ $markUp .= "<li>".((is_array($subj))?$cate.treeView($subj):$subj)."</li>"; } return "<ul>$markUp</ul>"; } treeView($book); //------------------- The result is what I expected language English Franch Arabic Programming PHP JAVA C++ Science Physics Geography Math I want to do the following (adding class) <ul> <li class="language">language <ul> <li>English</li> <li>Franch</li> <li>Arabic</li> </ul> </li> <li class="Programming">Programming <ul> <li>PHP</li> <li>JAVA</li> <li>C++</li> </ul> </li> <li class="Science">Science <ul> <li>Physics</li> <li>Geography</li> <li>Math</li> </ul> </li> </ul> Your help is highly appreciated Thank you.
×
×
  • Create New...