Perhaps, you should try with a conditional expression (using the ternary operator): ."\n" . ((!empty($_GET["link"])) ? (" [[" . ($_GET["link"]) . "| »Click here for more]]") : '') . "\n" Regards, Dom