I have a web site that allows the user to update pages my cade work in version 4 but not 3?
one file retrieves the data enter and store it in a text file
function createTapeObject($arr) {
$oTmp = new clsTape();
$oTmp->setTapeName($arr->TapeName);
$oTmp->setTapeNum($arr->TapeNum);
$oTmp->setTapePrice($arr->_TapePrice);
return $oTmp;
}
function getTapeArray() {
$DOC_ROOT = getenv("DOCUMENT_ROOT");
$sFName = $DOC_ROOT."/public/TapeData.txt";
if (file_exists($sFName)) {
$arrFile = file($sFName);
$line = trim($arrFile[0]);
$arrTape = unserialize($line);
if (is_array($arrTape)) {
$i = 0;
while (list($key, $val) = each($arrTape)) {
$oTape = createTapeObject($val);
$arr[$i] = $oTape;
$i++;
}
}
else {
$arr = array();
}
}
else {
$arr = array();
}
return $arr;
}
function storeTapeArray($arr) {
$DOC_ROOT = getenv("DOCUMENT_ROOT");
$sFName = $DOC_ROOT."/public/TapeData.txt";
$iNum = fopen($sFName, 'w');
fputs($iNum, serialize($arr));
fclose($iNum);
}
then another html page calls the array function and the information should display
<?
$arrTape = getTapeArray();?>
<?for ($i = 0; $i < count($arrTape); $i++) {
$oTape = $arrTape[$i];?>
<p align="left"><font size="+1" face="Verdana" color="#803048"><? echo $oTape->getTapeName(); ?>
</font><br>
<font color="#803048" face="Verdana" size="2">#<? echo $oTape->getTapeNum(); ?><br>
$<? echo $oTape->getTapePrice(); ?>
however whne using version 3 the array is not functioning properly. Are arrays set up differently between the two version?