It would have saved a lot of time if we can embed
PHP constants within a string.
For example:
$location = "{ROOT}/images/{$code}.jpg"
.
Here, ROOT is a defined constant.
But not possible to use.
It would have saved a lot of time if we can embed
PHP constants within a string.
For example:
$location = "{ROOT}/images/{$code}.jpg"
.
Here, ROOT is a defined constant.
But not possible to use.
If its a constant you all you need to do is this
$location = ROOT . "/images/{$code}.jpg";