-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
  • 635
  • 1
  • 10
  • 23

1 Answers1

3

here we go

$myVar = strip_tags('<a href="test.php">Text I Want</a>');
Saqueib
  • 3,452
  • 2
  • 30
  • 53