-3

This is not a duplicated question. I have a html tag that has id. I want to find value of id using php. How to do that? Is it possible? For example:

<p id="par"><?php /* find value of id */ ?></p>

I want to find "par" using php. Please answer exactly, for example some people say use html-dom but they don't know how.

mojtaba.zamani
  • 137
  • 1
  • 1
  • 9

1 Answers1

0

No, it is not.

PHP is executed on the server, not in the browser. You could try to parse the PHP file for the value, but the value is either a constant or it is already the result of a PHP expression, so there is no point.

RalfFriedl
  • 1,134
  • 3
  • 11
  • 12