> Hello,
> I want to set member variables out of their class. The code class is:
>
> <?php
>
> class translator {
>
>  var $nombre;
>  var $departamento;
>  var $despacho;
>  var $telefono;
>  var $correo_electronico;
>  var $pagina_personal;
>
>  function translator(){
>   $nombre = array("Nombre","Name");
>   $departamento = array("Departamento","Department");
>   $despacho = array("Despacho","Office");
>   $telefono = array("Teléfono","Phone");
>   $correo_electronico = array("Correo Electrónico","E-mail");
>   $pagina_personal = array("Página Personal","Personal HomePage");
>  }
> }
> ?>
>
>
> I access to this class from another php file and want to set this
> member variable:
>
> $c = new translator();
> echo $c->telefono;       /* this member isn't set but in
> constructor method has been set*/

So what error message do you get?

$c->telefono is an array so you will not be able to echo it straight out.
It will echo 'Array'.

Is this what you're getting?
If so, read up on arrays from the manual, specifically each

M:


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to