Here's what I want to do:
I want to have a file with just a bunch of variables that are defined by integers. Then I want to have another file that calls on the first file so I can then use those variables. The second file will then add 1 to one of the variables and will store the new value back into the first file.
Can you help me out?

Not completely sure I understand your application but....

1) you'll need to have variables that have at least one alphanumeric character in them. You can use $1 for a variable but you can use $val1.

2) To increment the value of a variable, you can just:
$val1 = $val1 + 1;
or even $val++;

The "storing back into the first file" is a bit confusing to me. What is the application?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.