Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/07/2006, 11:48
Agonzalez
 
Fecha de Ingreso: julio-2005
Mensajes: 25
Antigüedad: 18 años, 10 meses
Puntos: 0
Pregunta Como Mandar A Llamar Una Funcion Dentro De La Misma Clase

BUENO MI PROBLEMA ES EL SIGUIENTE YO TENGO DOS CLASES CON DOS METODOS ENTONCES QUIERO MANDAR A LLAMAR UN METODO DENTRO DEL OTRO PERO CUANDO INSTANCIO LA CLASE Y MANDO A LLAMAR EL METODO Q A LA VEZ ME MANDA A LLAMAR EL OTRO METODO ME GENERA UN ERROR Y NO SE A Q SE DEBE TALVEZ UDS ME ECHAN UNA MANO EL CODIGO ES EL SIGUIENTE

Código PHP:
class 
{
  
    public function 
z($sql)
    {
                
    }
  
    public function 
x($a)
    {        
        
z($a);

    }

en la instancia realizo esto:
Código PHP:
    $b = new B(); 
        
$y "valor";
       
$b->x($y); 
y el error q me genera esto es:
Código PHP:
Fatal errorCall to undefined function sql() in c:serverApachehtdocstrescomparacionclass_B.php on line 21 
no se si me pueden echar una mano con esto o me pueden decir la forma correcta de como se realiz, de antemano gracias por su ayuda.