JREAM Posted February 2, 2010 Share Posted February 2, 2010 How do you get this going: function Testing($value) { echo $this->Settings->page_$typeOfNotify; die; } function Testing('hello'); should check $this->Settings->page_hello; Quote Link to comment https://forums.phpfreaks.com/topic/190630-add-a-variable-to-a-string/ Share on other sites More sharing options...
salathe Posted February 2, 2010 Share Posted February 2, 2010 function Testing($value) { echo $this->Settings->{'page_' . $value}; exit; } Testing('hello'); Quote Link to comment https://forums.phpfreaks.com/topic/190630-add-a-variable-to-a-string/#findComment-1005451 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.