Incompetnce
02-04-2007, 08:59 AM
This question is probably pretty trivial, but I've been having trouble with it.
Basically, I have an array and a couple of variables that I use on several different pages on my site. I was thinking of having the variables just in a text file and having the php retrieve it from there. Then I would only have to alter the text file, rather than having to change each page's code individually.
My friend suggested something involving reading each line of text and entering it ino an array individually. But this sounds a lot more complicated than I need. I just want each page to read the text file and then "pretend" its contents were in the php code.
Any ideas?
Basically, I have an array and a couple of variables that I use on several different pages on my site. I was thinking of having the variables just in a text file and having the php retrieve it from there. Then I would only have to alter the text file, rather than having to change each page's code individually.
My friend suggested something involving reading each line of text and entering it ino an array individually. But this sounds a lot more complicated than I need. I just want each page to read the text file and then "pretend" its contents were in the php code.
Any ideas?