Is there a way in PHP to include a constant in a string without concatenating?

define('MY_CONSTANT', 42);

echo "This is my constant: MY_CONSTANT";

14 Answers
14

Leave a Reply

Your email address will not be published. Required fields are marked *