![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
04/08/2002, 17:59
|
![Avatar de Webstudio](http://static.forosdelweb.com/customavatars/avatar7242_2.gif) | Colaborador | | Fecha de Ingreso: noviembre-2001 Ubicación: 127.0.0.1
Mensajes: 3.499
Antigüedad: 23 años, 2 meses Puntos: 69 | |
Re: Crear Una A Partir De Otra. Me imaigno que te referirás a como "Heredar" una clase de otra?
bueno, es algo asi:
<?
clase A
{
var $texto;
function A($Text){
$this->texto = $Text;
}
}
clase B extends A
{
function mostrar()
{
echo $this->texto;
}
}
$objeto = new B("Hola Mundo");
$objeto->mostrar();
Echo "Saludos.";
?>
<hr><font size=2 face=verdana>- Pablo Rigazzi (<img src=http://www.fantabuloso.com/iB_html/non-cgi/emoticons/bullwhip.gif align=absmiddle>)[/CODE]
<font size=1 color=#333333>Visita <a href=http://www.web-studio.com.ar>Web Studio</a>[/CODE] |