Quote:
Originally Posted by AN-net
r u sure your returning something?
|
Ah, perhaps that's the problem. I wasn't looking to return anything - I was simply looking to execute code.
Perhaps functions are not what I need then...
Is there another way I can re-use the same section of code without needing to have two sets of it?
In other words, I'm trying to avoid this:
PHP Code:
if ($testvariable == true)
{
// Common Section of Code
}
if ($_REQUEST['do'] == 'custom_action')
{
// Unique Code goes here
// Duplicate of Common Section of Code
// More Unique Code goes here
}