How to write a link like which link to the same page in PHP? -


In HTML like

I & lt; A href = "# id" & gt; Can I link to a place where I & lt; Id = "id" & gt; But it seems that it does not work in PHP. How to do this?

The original code is from Bootstrap

  & lt; Div class = 'tabbable' & gt; & Lt; Ul class = 'nav nav-tabs' & gt; & Lt; Li class = 'active' & gt; & Lt; A href = '# tab1' Data-Toggle = 'Tab' & gt; Drink & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '# tab2' Data-Toggle = 'Tab' & gt; Bread & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div class = 'tab-content' & gt; & Lt; Div class = 'tab-panel active' id = 'tab1' & gt; & Lt; P & gt; Some & lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = 'tab-panel' id = 'tab2' & gt; & Lt; P & gt; Many & lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt;   

But when I changed to PHP, tab link does not work

Edit:

Are you trying to sth like this? See:


See examples of work:

  & lt; A href = "# id" & gt; Id & lt; / A & gt; & Lt; Div style = "margin-top: 2000px;" & Gt; & Lt; / Div & gt; & Lt; Id = "id" & gt; Id & lt; / A & gt;    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -