PHP: If $_GET then bold it

alicesayuw1

New Member
\[code\]echo '<a href="http://stackoverflow.com/questions/3870697/?view=new&days=2">2</a> ? <a href="http://stackoverflow.com/questions/3870697/?view=new&days=4">4</a> ? <a href="http://stackoverflow.com/questions/3870697/?view=new&days=7">7</a> ? <a href="http://stackoverflow.com/questions/3870697/?view=new&days=14">14</a> ? <a href="http://stackoverflow.com/questions/3870697/?view=new&days=30">30</a> days';\[/code\]I have this as a "submenu", for showing newest members. You can choose for how many within days you want to see the newest users on the site. Its much repeating myself, the only thing that is changing is days=30 in the link, and "30" as linktext.Now I would like to check if $_GET["days"] == 2, then bold it, \[code\]<strong>2</strong>\[/code\].I could do this myself, but then it would be just duplicating it all, and in every link do the $_GET["days"] == 1, $_GET["days"] == 2, $_GET["days"] == 3..Isnt there a smarter way to do this without repeating myself all the time?
 
Back
Top