Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Carey R. Dayrit  >  Stack 2  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample Code in using the class
Class: Stack 2
Manipulate stacks using two dimensional arrays
Author: By
Last change:
Date: 2004-09-07 01:11
Size: 460 bytes
 

Contents

Class file image Download
<?php
include('stack2.class.php');


$my_record=new STACK2('id','name');

$my_record->push(235,'John');
$my_record->push(536,'Paul');
$my_record->push(758,'Mary');

$g=$my_record->pop();
foreach(
$g as $k){
 echo 
$k;
 echo 
"<br />";
}
$g=$my_record->pop();
foreach(
$g as $k){
 echo 
$k;
 echo 
"<br />";
}
$g=$my_record->pop();
foreach(
$g as $k){
 echo 
$k;
 echo 
"<br />";
}
$my_record->push(153,358);
$g=$my_record->pop();
?>