Trying to build a path with php variables

0

In a page I show the data of a user among them I have stored the photograph that is stored with the number of user id in a folder that is the user id. I mean, the route would be

/images/usuarios/{idusuario}/{idusuario.jpg/png}

and to show the photograph I post the following:

<img class="ui centered small circular image" src="../../images/usuarios/<?php $idusuario; ?>/<?php $idusuario; ?>.jpg">

Well, it turns out that it does not work ... How could I build that route in a correct way?

for example, if the user id was "16", the path of the image would be:

/images/usuarios/16/16.jpg
    
asked by MNibor 03.08.2017 в 20:29
source

1 answer

2

Try with:

<img class="ui centered small circular image" src="../../images/usuarios/<?php echo $idusuario; ?>/<?php echo $idusuario; ?>.jpg">
    
answered by 03.08.2017 / 20:38
source