Jump to content

[SOLVED] can you concactenate constants?


dsaba

Recommended Posts

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

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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.