how to write a php code such that a link specified must directly display the contents of the link in the browser..??
Therefore, we're dealing with an HTML issue, not a PHP issue. If your question means that you don't want the link to open a new window, you could leave off the "target" attribute in the anchor link (target="_blank" is the one that opens a new browser window).
<a href="/openthispage.php">Open this page</a>
(Above is labeled "PHP syntax" but it is really HTML syntax)
To do this within PHP tags, use the "echo" command -
$link = "<a href='/openthispage.php'>Open this page</a>";
by compusolver: Explaining that labeled PHP syntax is actually HTML
The only problem with this is that it grabs the HTML exactly as it appears on the page, so any relative links will be broken. If the page uses relative linking, then you'd have to write a regular expression and use preg_replace().