rajeshatbuzz Posted July 7, 2011 Share Posted July 7, 2011 Hi, I am using php 5.3.4 and try to add some url link under echo statement n found some useful code from google. but it seems its working.. any idea?? echo "<a href=\"http://www.your link here.com\">Click here</a>"; echo "<a href='http://www.your link here.com'>Click here</a>"; What is the correct code to add href under echo statement.. Another Questions. How to call another php form inside echo statement? Quote Link to comment https://forums.phpfreaks.com/topic/241311-hrrf-url-in-echo-statement/ Share on other sites More sharing options...
MasterACE14 Posted July 7, 2011 Share Posted July 7, 2011 Echo Language Construct Quote Link to comment https://forums.phpfreaks.com/topic/241311-hrrf-url-in-echo-statement/#findComment-1239531 Share on other sites More sharing options...
rajeshatbuzz Posted July 7, 2011 Author Share Posted July 7, 2011 I did look at it but could not find solution... I also tried this but dint work... echo "<a href="AddNewServer.php">Click here</a>"; Quote Link to comment https://forums.phpfreaks.com/topic/241311-hrrf-url-in-echo-statement/#findComment-1239533 Share on other sites More sharing options...
rajeshatbuzz Posted July 7, 2011 Author Share Posted July 7, 2011 yes, Following pattern worked for me..I was making some mistake in syntax.. echo "<a href=\"http://www.your link here.com\">Click here</a>"; echo "<a href='http://www.your link here.com'>Click here</a>"; Worked for me... echo "<a href=\"http://localhost/dbSize/AddNewServer.php\">Click here</a>"; but still i am looking for following code to be worked... echo "<a href="AddNewServer.php">Click here</a>"; where AddNewServer.php is in same directory.... Quote Link to comment https://forums.phpfreaks.com/topic/241311-hrrf-url-in-echo-statement/#findComment-1239534 Share on other sites More sharing options...
MasterACE14 Posted July 7, 2011 Share Posted July 7, 2011 echo "<a href=\"AddNewServer.php\">Click here</a>"; Quote Link to comment https://forums.phpfreaks.com/topic/241311-hrrf-url-in-echo-statement/#findComment-1239539 Share on other sites More sharing options...
QuickOldCar Posted July 7, 2011 Share Posted July 7, 2011 This also works, if use double quotes to wrap, use all single quotes within. or escape the double quotes \" echo "<a href='AddNewServer.php'>Click here</a>"; Quote Link to comment https://forums.phpfreaks.com/topic/241311-hrrf-url-in-echo-statement/#findComment-1239594 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.