manix Posted July 8, 2011 Share Posted July 8, 2011 I've seen this "#" in php links and I wondered what does it do. Is it the same as "&" :? I tried googling it first but I couldn't find an answer. Quote Link to comment https://forums.phpfreaks.com/topic/241453--/ Share on other sites More sharing options...
jcbones Posted July 8, 2011 Share Posted July 8, 2011 In an anchor tag, the # designates a link to an id attribute. If there is no valid id attribute applied after the #, your browser will just reload the same page. Quote Link to comment https://forums.phpfreaks.com/topic/241453--/#findComment-1240322 Share on other sites More sharing options...
manix Posted July 8, 2011 Author Share Posted July 8, 2011 call me stupid but I didn't really get it.. What ID? like in <div id='blabla'> ? EDIT: Oh I think I get it, if I have an element with the id mentioned in the link after the # the page will scroll down to that element, is that it? EDIT2: Great I just tested it, thanks for the reply! Quote Link to comment https://forums.phpfreaks.com/topic/241453--/#findComment-1240323 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.