Good, I'm working with an object-oriented php, so I have one class and two methods, in the first method I have a foreach
where I extract values from the database
public function ambitosController(){
$respuesta = gestorOposicionesModels::ambitosModel("amb_oposiciones");
foreach($respuesta as $row => $item){
echo '<option value="'.$item["titulo"].'">'.$item["titulo"].'</option>';
}
}
And for the other method where I would like to see what the aforementioned method brings, I am doing another foreach
but in one part I would like you to show me the value of the first method.
I can not think of anything, I already tried invoking the method in the following way:
$categoria = self::categoriasController();
But it shows me the results outside of where I'd like you to show them to me ..