Do two seperate files. One file is the non read only file .php and the other is the read only .php then php include the read only file where you need it to be.
no there isn't a way. You can always access the array and change it as long as it is in the scope of that array.
What you can do it set define() and it will always be the value you set through out the script. Then again it will have to be in the working scope.