I am printing a Urls with several data in a single echo
the url to print is: http://localhost/prueba/profile.php
and the values of the variables are: $ url = http://
$ host = localhost
APP-RAIZ = prueba
Try the following form but print an error:
echo '<a href="'.$url $host APP_RAIZ.' profile.php">Iniciar Sesión</a>';
Parse error: syntax error, unexpected '$ host' (T_VARIABLE), expecting ',' or ';' in C: \ xampp \ htdocs \ test \ header.php on line 53
Try the following way but it also prints an error:
echo "<a href="'.$url $host APP_RAIZ.' profile.php">Iniciar Sesión</a>";
Parse error: syntax error, unexpected ''. $ url $ host; APP_RAIZ ;. '' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in C: \ xampp \ htdocs \ test \ header.php on line 54
Of the following form also but without result.
echo '<a href=" '.$url.' '.$host.' '.APP_RAIZ;.' login.php">Iniciar Sesión</a>';
I have made another type of printing of several data in a single echo
without any error, I do not see where I am doing wrong in printing the url
echo'<img src="img/upload/'.$pro['image'].'" alt="'.$pro['profile'].'" />';