1

I'm new to Drupal Answers, but I've been programming for a few years now.

I'm looking to create something simple (at least I think) within the Drupal CMS to use throughout the site. I want to create a variable, let's call it $phonenumber and store the value of this variable, like (789) 456-7894 (not a real number). That way I may use the value of this variable on my site without hardcoding the number.

I have installed the Variable module, which has little to no documentation, and poor usability all around.

I build in PHP, I know this is basic, Drupal is built on PHP. But for some reason I cannot get a printr or echo of the variable on any page to work.

1

1 Answer 1

0

Are you aware of the devel module? It is typically used in dev versions of a site only, and is not recommended for production status sites.

After you enable that module, you'll get many features, such as dprint_r(), dpm() (I like the last one for debugging). For more details, refer to https://www.drupal.org/node/174575 ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.