PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
  Classes of Mohammad Keramatifar  >  PHP TreeView  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Example
Class: PHP TreeView
Display a collapsible tree from a MySQL query
Author: By
Last change: Updated to using mysqli extension instead of deprecated mysql
Multiple treeview(s) in a single web page support
Better performance in using database and system resources
Date: 1 month ago
Size: 845 bytes
 

Contents

Class file image Download
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

<title>Keramatifar Treeview Right-To-Left Sample</title>
<link rel="stylesheet" type="text/css" href="ltr.css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="funcs.js"></script>
</head>
<body>
 
 <?php
 
 
//include the treeview class
 
include 'class.treeview_new.php';
//create an instant of Treeview Class
 
$treeSample = new Treeview('localhost','root','','hk');
 
//Calling the method to generate tree view and set the queryArray public member for Input Parameter
 
$treeSample->CreateTreeview('hk','id','title', 'parent_id', 'perfixForJqueryIDs');
 
//echo the public member of object names treeResult (Contain the treeview html and jquery codes)
 
echo $treeSample->treeResult;

?>

 

</body>
</html>