im having an problem, currently im using a code to alter page content.

if (isset($_GET['ad']) && $_GET['ad'] == 1)
echo "";
else {
echo '<div class="ad-area"><p>This is the ad, click here</p> </div>';

But now I face a problem, since I need to display another URL and it echos from wordpress custom field.

<input type="hidden" name="link" value="<?php echo $linkk; ?>?kw=<?php echo $_GET['kw']; ?>" />

What I would like to see is that if url has


inside it,

$linkk would be $linkk2

, but im unsure how to do it, cause echoing just displays the code, cause its server side. Since its a page template and the URLs change, then I cant just insert them into the code.

What to do?


Read more here: Echoing php in php


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:


Wordpress related questions and answers: