Question: > 
> **Possible Duplicate:**  
> 
> [Include constant in string without concatenating](https://stackoverflow.com/questions/2203943/include-constant-in-string-without-concatenating) 
> 
> 
> 

How can I get a constant to be evaluated in a string like variables are?

```
$foo = "like";
define('BAR', 'fish');

// None of these give me 'I like to eat fish on Tuesday.'
echo "I $foo to eat BAR on Tuesday.";
echo "I $foo to eat {BAR} on Tuesday.";
echo 'I $foo to eat BAR on Tuesday.';

// This works but is undesirable
echo 'I $foo to eat '.BAR.' on Tuesday.';

```

Answer: 
The only way I know this'd works (which you may already be aware of) is by doing:

```
<?php
$foo = "like";
define('BAR', 'fish');
$constants = get_defined_constants();
echo "I $foo to eat {$constants['BAR']} on Tuesday.";
?>

```

which prints:

```
I like to eat fish on Tuesday.

```
of course there is no way. And no need.