<?php
/**
*
* FileArray class example
* A less memory footprint simple array manipulation for PHP
*
* Example file
*/
require_once(__DIR__.'/FileArray.php');
# 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];
echo $fileArrObj[1];
// OR
# retrieve from array
echo $fileArrObj->get(0);
echo $fileArrObj->get(1);
|