Skip to content
Advertisement

How to create a link to another PHP page

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>

Advertisement

Answer

Use like this

<a href="index.php">Index Page</a>
<a href="page2.php">Page 2</a>
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement