Jump to content

Recommended Posts

Hi,

 

Take this example;

 

I sell one service on my website. On many pages the cost of this service is displayed: Say the repeated statement "12month membership for £20".

 

The cost may vary from time to time and I do not wish to change every statement. Taking this to another level, my site has many repeated statements, what is the best way to display these 'would be' variables on my website.

 

Do i create a "master" php script and include it on every page? Is there a better way like configuring all pages to reference this master via htacess (for example)?

 

Your thoughts,

Link to comment
https://forums.phpfreaks.com/topic/188104-global-variables/
Share on other sites

if you need to include a page, than you include a page. A programmers gotta do what a programmers gotta do. Efficiency will only come into play if your start including gigantic files. But if you include files with a few lines its basically the same (well a little different) as just copy pasting the lines to wherever the include command is.

 

 

Link to comment
https://forums.phpfreaks.com/topic/188104-global-variables/#findComment-993089
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.