Answer the question
In order to leave comments, you need to log in
Yii not outputting print_r?
Good day to all.
I am just starting to learn yii framework php.
Why doesn't the print_r function work in /protected/modules/ , that is, as I understand it in the module files ?
I want to output the contents of the $data array . How can I see it?
public function getSupplierDataList($article, $id) {
$request = array(
'method' => 'SupplierCrossPrice',
'key' => $this->key,
'timeout' => $this->timelimit,
'request' => $request_array,
);
$data = $this->getApiRequest($request);
print_r($data);
return array();
}
Answer the question
In order to leave comments, you need to log in
in yii2 there is a VarDumper helper, it seems to be called, look at the doc. A "budget option"
echo "<pre>";
var_dump($data);
echo "</pre>";
die;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question