I have the following inside a function something():
if ($cod == 1000)
{
$message = 'Some Message';
return $message;
}
Later, I call this function:
try
{
$comandoController->someThing();
}
I was expecting to see "Some Message" on the browser. But I don't.
Note: If I echo
something like echo "hello"
inside the conditional, I can see it. So the condition is the case.
Instead of $comandoController->someThing();
should we do the following:
$result = $comandoController->someThing();
echo $result;