I need to extract the value of a constant in PHP from a string. My example will explains it better than my words :)
constants.php :
define('CONNECTION_FAILED', 'Connection Error');
index.php :
include_once 'constants.php';
$success = $_GET['message']; //$success -> "CONNECTION_FAILED"
Now what I want to do is to show the value of the constant with the name present on the $success variable.
Do you know a way to do this simple thing ?
Thank you in advance