Location: PHPKode > scripts > iviArray > iviarray/example2.php
<?php

 require_once('iviArray.class.php');

 mysql_connect('localhost', 'root', '') or die(mysql_error());
 mysql_select_db('db');
  
 $result = mysql_query('SELECT * FROM table') or die(mysql_error());
 
 $array = new iviArray();
 $array->fetch($result, true, 'mysql');

 print('<pre>');
 
 
 $array->display();
 $array->sort();
 $array->display();
 
 print('</pre>');
 
?>
Return current item: iviArray