[thelist] PHP and anchors

Hendrik Mans hm at netzbiest.de
Sat Jan 13 12:56:31 CST 2001


Jason,

> I have seen this done, but am not sure how to. I want to set up, in a .php
> file, anchor names so that I can link to the different parts of the page
> directly in the HTML - however, it messes with the querystring. Is there a
> way that this can be done? I have seen it in ASP (thought I dont know how,
> and if I did, it probably wouldn't help much). For example:

Since anchors are standard HTML, all you need to do is print them using the
echo() or print() functions, or just by escaping from the PHP script.

  print("<a name=\"foo\"></a>");
  echo("<a name=\"foo\"></a>");
  ... ?><a name="foo"</a><?php ...

Take care,
Hendrik





More information about the thelist mailing list