Location: PHPKode > scripts > Stack > stack-2/sample.php
<?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();
?>




Return current item: Stack