Inconveniente con array en php
Publicado por John (2 intervenciones) el 17/10/2016 23:18:57
Cada vez que ejecuto el siguiente código en php me salta este error:
Notice: Array to string conversion in ..\Playground\ Array PHP Notice: Array to string conversion in ..\Playground\
Cómo lo podría solucionar? Gracias
Notice: Array to string conversion in ..\Playground\ Array PHP Notice: Array to string conversion in ..\Playground\
Cómo lo podría solucionar? Gracias
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
class Cliente {private $nombre;
private $mail;
function __construct ($nombre,$mail){
$this->nombre = $nombre;
$this->mail = $mail;
}function __destruct (){
// echo "ok" ;
}public function VerCliente(){
$dato = array($this->nombre, $this->mail);
return $dato ;
} }$Cliente = new Cliente ("gomez","xxx@xxx.com");
echo $Cliente->VerCliente ();
?>
Valora esta pregunta


0
