I saw this tip on someone's website once, but I don't remember who, so if it was you, thank you. This isn't really much, but if you ever need to quickly block off a section of code with a comment for testing, try doing this:
PHP Code:
//*
Your test code goes here.
//*/
By setting up your comment block like this, you can toggle it on and off just by adding or subtracting a single slash in the first line.
Commented:
PHP Code:
/*
Your test code goes here. This will NOT execute.
//*/
Uncommented:
PHP Code:
//*
Your test code goes here. This will execute.
//*/
Not the greatest revelation of all time, but it's a neat little trick.
Last edited by VirtuosiMedia; 05-27-2008 at 09:27 PM..
|