I just converted some of my HTML
pages to PHP
pages, and I'm not that familiar with PHP
. In my HTML
pages, assuming it's just a static web app, I can link to another page quite simply by playing the following anchor
on the page:
<a href="go-to-this-page.html">This is a link</a>
So, after converting the pages to PHP
in order to make sure that I can template and include templates a bit easier and faster, I don't know how to include these links.
For example, say I have two pages, index.php
and page2.php
. How would I create an anchor link to this page?
<a href="??????">This is a link</a>
Thanks for any help!
Just try like this:
Easiest:
And if you need to pass a value:
To retrive the value put in page2.php this code:
Now the variable
$val
has the value1
.You can also used like this
Use like this
if you wanna use html tag like anchor tag you have to put in echo
Html a tag
Link in html