Login   Register  
PHP Classes
elePHPant
Icontem

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Moritz HeidkampPreview the content newsletter M  >  iviArray  >  example2.php  >  Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Explaining conversion of database result resources
Class: iviArray
Encapsulation of PHP array functions
Author: By
Last change: added parameter true (use associative arrays)
Date: 2003-08-02 22:06
Size: 396 bytes
 

Contents

Class file image Download
<?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($resulttrue'mysql');

 print(
'<pre>');
 
 
 
$array->display();
 
$array->sort();
 
$array->display();
 
 print(
'</pre>');
 
?>