Dlaczego ponizsze wyrazenie nie zwraca wyniku ?
<?php $this->rate = $this->rankArray[item_rate] / $this->rankArray[item_rates]; ?>
Probowalem z doubleval itp itp i nadal nic. Gdzie jest blad ?
<?php $this->rate = $this->rankArray[ 'item_rate' ] / $this->rankArray[ 'item_rates' ]; ?>
<?php public function showRate($type) { $this->type = $type; $this->checkRating(); } ?>
<?php private function checkRating() { ?>
<?php private function checkRating() { } public function showRate($type) { $this->type = $type; $this->checkRating(); } ?>
<?php case "item": $this->query("SELECT item_rate, item_rates FROM casts WHERE item_id = '$this->id'"); break; if ($this->rankArray[item_rates] == 0) { $this->rate = 0; } else { $this->rate = $this->rankArray['item_rate'] / $this->rankArray['item_rates']; } break; return $this->rate; } ?>