1. $telefono is an array (as has already been pointed out) so you need to reference an element 2. you're never actually setting the property in the constructor, your constructor lines should be: $this->telefono = array("Teléfono","Phone"); etc.
Tim ---------- From: Silvia Mahiques [SMTP:[EMAIL PROTECTED]] Sent: 31 October 2001 14:38 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: setting member variables out of class 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*/ I have written too: echo $c->$telefon; echo "{$c->telefon}"; but is not correct. Can anybody help me? Thanks Silvia Mahiques -- 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]