File: Sample.php

Recommend this page to a friend!
  Classes of tobytobs  >  PHP File Array  >  Sample.php  >  Download  
File: Sample.php
Role: Example script
Content type: text/plain
Description: Sample usage of the filearray class
Class: PHP File Array
Store and retrieve values from files as arrays
Author: By
Last change:
Date: 6 years ago
Size: 617 bytes


Class file image Download

     * FileArray class example
     * A less memory footprint simple array manipulation for PHP
     * Example file

# initiate the array Object
$fileArrObj = new FileArray();

# add to array
$fileArrObj[] = "Hello";
$fileArrObj[] = "World";

// OR

     # add to array
$fileArrObj->add( "Hello" );
$fileArrObj->add( "World" );
# retrieve from array
echo $fileArrObj[0];
// OR
     # retrieve from array
echo $fileArrObj->get(0);

For more information send a message to info at phpclasses dot org.