Ver Mensaje Individual
  #6 (permalink)  
Antiguo 01/04/2018, 11:58
alvaro_trewhela
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Leer variable $_GET dentro de una clases

Código PHP:
Ver original
  1. class getInClass{
  2. private $get = "";
  3.  
  4. public function __construct($g){
  5. $this->get = $g;
  6. }
  7.  
  8. public function showGet(){
  9. return $this->get;
  10. }
  11.    
  12. }

$myGet = new getInClass($_GET["some"]);

echo $myGet->showGet();