'How to get the variable value inside sigle quote by variable name using php [duplicate]

I need to get the value of the given variable name without quotes(''). Is it possible with php?

variableName='value'

I think using preg_match or regex... It is possible? But how?

Needed output as

value



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source