Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/01/2012, 15:49
Avatar de ClubIce
ClubIce
 
Fecha de Ingreso: diciembre-2008
Mensajes: 216
Antigüedad: 15 años, 4 meses
Puntos: 2
Pregunta Notice: Array to string conversion

Código PHP:
Ver original
  1. <?php
  2.     class Query {
  3.         var $type;
  4.         var $action;
  5.         var $param;
  6.         function __construct($type,$action,$param) {
  7.             $this->$action = $action;
  8.             $this->$type = $type;
  9.             $this->$param = $param;
  10.         }
  11.     }
  12.     function parse_query($q) {
  13.         $type = ord(substr($q,0,1));
  14.         $action = ord(substr($q,1,1));
  15.         $len = ord(substr($q,2,1));
  16.         $param = array();
  17.         return new Query($type,$action,$param);
  18.     }
  19. ?>

me pueden explicar porque sucede y como lo arreglo?