Pass driver variable to the view

0

I'm trying to get the result of a query to the view, I'm doing a simple example in this way, but it still does not show the information it has in the controller

controller.php

public function mostrarInfoTienda(){
    $prueba="pruebaaaaaaa";
}

and in the seen I call it like this:

 $ver = new Controller();
 $prueba = $ver -> mostrarInfoTienda();

echo "esta es la variable". $prueba;
    
asked by jorgnv 24.08.2017 в 22:24
source

1 answer

0
public function mostrarInfoTienda(){
    $prueba="pruebaaaaaaa";

    return $prueba;
}

in the view

$ver = new Controller();
$prueba = $ver -> mostrarInfoTienda();
echo "esta es la variable". $prueba;
    
answered by 24.08.2017 / 22:30
source