I am writing a script in php that makes a query to a sql database.
The result of that query I need to concatenate it with a string.
Example: the query to the database returns
"Cosme Fulanito" and I need to concatenate it with a string that says
"Mi nombre es" so that the result is
"Mi nombre es Cosme Fulanito" .
The query result is stored in a variable and the string is equal, and try with:
$consulta = "ejemplo de consulta"; $cadena = "Mi nombre es" ; $nombre = $cadena . $consulta;
How could I solve it?