In a language that I used to program in - for development we used to be able
to make a function that basically just executed everything inbetween:
<hidecode>
Print "This is html printed" <some programming code> Print "this is more
code";
</hidecode>

So basically everything in between hidecode and /hidecode is executed the
same as if the hide code did not exist - except that the hidecode container
would be something like:

Function hidecode() {
    if(getenv("remoteaddress")=="myaddress") {
        %s (all code contained within the tags)
    }
}

So - the question is does PHP have some way that I cannot see to do this?

I realize that I could create a function and pass everything in as an
argument - but that would involve putting everything into variables, and
overall being just a pain in the ass to add and remove the container.

Is PHP too sophisticated a language to be able to do this easily and
quickly?  Or am I just missing some form of function that is totally
obvious?

Finally - yes, I know that I could slap an if tag around it - but that is
also a big pain in the ass to add and remove each if tag when you go 'live'
with the change, as opposed to a quick find and replace with a container
function like this...

TIA



--
Cheers

Mike Morton

****************************************************
*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*
****************************************************

"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to