new to oop and having problem

this is a class that is suppose to take html and switch certain words with words in a flat file

[php]

<?php class getdbinfo { var $htmlAdd; var $maxcountAdd; var $fileAdd; const cname = 'change_name'; var $count_up = 0; function getdbinfo($html, $maxcount, $file){ $this->htmlAdd = $html; $this->maxcountAdd = $maxcount; $this->fileAdd = $file; } function getInfo(){ $file_handle = fopen($this->fileAdd, "r"); $changename = $this->cname . $this->count_up; $sepchange = '$seperate[' . $this->count_up . ']'; while (!feof($file_handle)){ $line = fgets($file_handle); $seperate = explode(':::', $line); while ($this->count_up != $this->maxcountAdd){ $return_value = str_replace($changename,$sepchange,$this->htmlAdd); $this->count_up++; } return $return_value; } fclose($file_handle); } } ?>

[/php]

forgot to add that it is only returning the original html

Sponsor our Newsletter | Privacy Policy | Terms of Service