extra curly bracket error
Posted: Mon Jan 15, 2007 4:42 pm
I can't seem to find a curly bracket error in my function that this error is referring to.Parse error: syntax error, unexpected '{' in /home/clinton/hdd1/owl/project/project/stock/tests/stock_class.php on line 238
Code: Select all
function mysql_score(){
if( preg_match("!\d*.\d+!", $this->future_5_earnings[1]) && preg_match("!\d*.\d+!", $this->past_5_earnings[1])){
$earnings = $this->future_5_earnings[1]*$this->past_5_earnings[1];
}
else{
print $this->ticker."doesn't have good earnings";
}
if( preg_match("!\d*.\d+!", $this->liabilities[1]) && preg_match("!!",$this->curass[1])){
$finance = $this->curass[1] / $this->liabilities[1];
}
else{
print $this->ticker."doesn't have liabilities or assets";
}
if( preg_match("!\d*.\d+!", $this->multiplier[1]) && preg_match("!\d*.\d+!", $this->bookval[1]){
$pe = $this->multiplier[1] * $this->bookval[1];
$inv_pe = 1 / $this->multiplier[1];
$final_pe = $pe / $inv_pe;
}
else{
print $this->ticker."needs a p/e or bookval";
}
$this->score = $earnings * $finance * $final_pe;
}if( preg_match("!\d*.\d+!", $this->multiplier[1]) && preg_match("!\d*.\d+!", $this->bookval[1]){
does anybody see any problems with this class method???