dsaba Posted April 19, 2007 Share Posted April 19, 2007 I define my constant here: define('Game_Information', 'Game Information', true); i'm trying to do this: echo Game_Information.'<br>'; or this: echo '.Game_Information.'<br>'; it doesnt work, how could I mix text strings and constants together? ( in other words concactenate them) Link to comment https://forums.phpfreaks.com/topic/47719-solved-can-you-concactenate-constants/ Share on other sites More sharing options...
cyrilsnodgrass Posted April 19, 2007 Share Posted April 19, 2007 hi, just tried this - echo Game_Information." some text "; Works fine for me - perhaps some reading up on basic concatenation (note the spelling btw) Regards, CyrilSnod Link to comment https://forums.phpfreaks.com/topic/47719-solved-can-you-concactenate-constants/#findComment-233053 Share on other sites More sharing options...
dsaba Posted April 19, 2007 Author Share Posted April 19, 2007 thats odd because this: echo Game_Information." some text "; should be equal to this: echo Game_Information.' some text'; hmmmmm, what version of php are running, i'm running 4 Link to comment https://forums.phpfreaks.com/topic/47719-solved-can-you-concactenate-constants/#findComment-233064 Share on other sites More sharing options...
cyrilsnodgrass Posted April 19, 2007 Share Posted April 19, 2007 Version 4.3.2 Tested using :- <? define('Game_Information', 'Game Information', true); ?> <html> <head> <title> PHP Freaks Forum Test </title> </head> <body> <? echo Game_Information." some text"; ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/47719-solved-can-you-concactenate-constants/#findComment-233073 Share on other sites More sharing options...
dsaba Posted April 19, 2007 Author Share Posted April 19, 2007 missed that little dot before, thats what threw it off good eye Link to comment https://forums.phpfreaks.com/topic/47719-solved-can-you-concactenate-constants/#findComment-233077 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.