Getting environmental variable via plugin A similar question was answered before, but I was wonder how I might be able to return the same query from within a plugin (php)?

Convert this:

{{ craft.config.environmentVariables.baseUrl }}


To something like this: (not correct)

return craft()-&gt;config-&gt;get('environmentVariables.baseUrl');


What would be the correct syntax?

Thanks, Mark.
Solution:

return craft()-&gt;config-&gt;get('environmentVariables')['baseUrl'];