kysonedin Posted September 14, 2006 Share Posted September 14, 2006 I would like to add a link in define(). How is the coding ?define('<a href="http://www.yahoo.com">Yahoo</a>'); //is this correct????? Link to comment Share on other sites More sharing options...
skym Posted September 14, 2006 Share Posted September 14, 2006 Did you try it?Where is the constant name?define('CONSTANT_NAME','<a href="http://www.yahoo.com">Yahoo</a>');http://php.net/define Link to comment Share on other sites More sharing options...
kysonedin Posted September 15, 2006 Author Share Posted September 15, 2006 Did you try it?Where is the constant name?define('CONSTANT_NAME','<a href="http://www.yahoo.com">Yahoo</a>');http://php.net/define welcome = MY_CONSTANT_NAME;define('MY_CONSTANT_NAME','<a href="http://www.yahoo.com">Yahoo</a>');However, "Yahoo" doesnt show any link to be click. Its just a plain text, with no linking.How to solve this? Anyone? Thanks Link to comment Share on other sites More sharing options...
aleksanteri Posted September 15, 2006 Share Posted September 15, 2006 I am now half quessing, but try: define('MY_CONSTANT_NAME', "<a href=\"http://www.yahoo.com\">Yahoo</a>"); Link to comment Share on other sites More sharing options...
skym Posted September 15, 2006 Share Posted September 15, 2006 define('MY_CONSTANT_NAME','<a href="http://www.yahoo.com">Yahoo</a>');$welcome = MY_CONSTANT_NAME; Link to comment Share on other sites More sharing options...
kysonedin Posted September 15, 2006 Author Share Posted September 15, 2006 define('MY_CONSTANT_NAME','<a href="http://www.yahoo.com">Yahoo</a>');$welcome = MY_CONSTANT_NAME;OK, this works. Link to comment Share on other sites More sharing options...
reportingsjr Posted September 15, 2006 Share Posted September 15, 2006 You forgot to define it before putting it in the variable . You know you dont need it in a variable, you can just do echo MY_CONSTANT_NAME; and it will echo <a href="http://www.yahoo.com">Yahoo</a> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now