url rewriting - Passing a variable to hyperlink text?

admin2025-06-03  2

Hope the question is not phrased badly

Is it possible to pass a variable to for example

having an:

echo '<a href="' . esc_url( $link ) . '"> $link </a>'; 

so that the hyperlink is the same as the printed out version always?

Hope the question is not phrased badly

Is it possible to pass a variable to for example

having an:

echo '<a href="' . esc_url( $link ) . '"> $link </a>'; 

so that the hyperlink is the same as the printed out version always?

Share Improve this question asked Jan 29, 2019 at 10:44 DevineDevine 33 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Sure, you only need to concatenate it again. Try:

echo '<a href="' . esc_url( $link ) . '">' . $link . '</a>';
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748966046a315222.html

最新回复(0)