I don't understand why I get return from my controllers but it wont print a simple var_dump
.
Steps I follow:
-
modules/controllers/home.php
$result = modules::run("apis/c_$api/data", $parameters); var_dump($result); //works
-
modules/apis/controllers/c_api1.php
function data() { #.... case 'getDataInfo': echo 'baa'; //Not working $result = simplexml_load_string($this->api1->getDataEntry($parameters['id'], false)); var_dump($result); //Not working break; #.... }
Any ideas why this happens? The fact that returning $result
works but not the echo
or var_dump()
Update
The function works because if I comment the $result
line inside the case, I have no output. That means that the case works, but even so I don't get the echo