-2

How can I get the text from an html link ? For example, if I have this form:

<form action="test.php" method="POST">
    <a href="test.php" name="link">Text to store</a>
</form>

how could I have something similar to echo $_POST['link'];

qwertzuiop
  • 685
  • 2
  • 10
  • 24

1 Answers1

3

here we go

$myVar = strip_tags('<a href="test.php">Text I Want</a>');
Saqueib
  • 3,484
  • 3
  • 33
  • 56