0
The problem is that this way, return only the last column of the database
public function Acentos ( $string ) {
$Acentos = $this->SelectDados(
"*",
"table",
"",
array ()
);
foreach ( $Acentos as $List ) {
$table = array (
$List['slug'] => utf8_encode ( $List['nome'] )
);
}
return strtr ( $string, $table );
}
I tried to do so
$Dados = array ();
foreach ( $Acentos as $List ) {
$table = array (
$Dados[] = $List['slug'] => utf8_encode ( $Dados[] = $List['nome'] )
);
}
Parse error</b>: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'
$List['slug'] => utf8_encode ( $List['nome'] )
– mehid