mardi 27 juin 2023

How to Count Data from Another Function

I have a trouble from my controller. When i want to count the array from another function in controller is get a error cannot to count

I get this error

Call to a member function get() on array

This my controller :

Function A
public function detailFees(){
$dataArray = array(
    'datapayment' => $datapayment,
    'countafter' => $countafter,
    'countbefore' => $countbefore
  );
}

Function B
public function data(){
$data = count($this->detailFees($market)->get(datapayment))
}

I want to count data with result in number

Thanks for help!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire