Friends I have a string type 

I want to enter a new parameter: typeview with 2 values: list and gallery

So, how to make this parameter be added to the original line? I did it like this, but it didn't work out for me:

 <a href="&typeview=list">Список</a> | <a href="&typeview=gallery">Галерея</a> 
  • At the moment, if I press the button then? Grp = 7260 disappears, and I don’t want to - oldzas

2 answers 2

 <a href="">Список</a> <a href="">Галерея</a> 

Well, the URI, of course, make it dynamic.

    It is necessary to get the address of the current page, and add to it both variants of the parameter:

     $url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; printf( '<a href="%1$s&typeview=list">Список</a> | <a href="%1$s&typeview=gallery">Галерея</a>', $url );