Validating required fields I basically check for required input fields and if they fail to validate, I need to go to another level of output, check for other required fields, and so on...

I can't get my head around this easy step-by-step validation. I already had it in a while-loop, but found it even more horrible than with beginner-like if-cases. I still think, though, that it could be written a bit simpler (and maybe improve readability).

It already is a quite simple thing to do, but in the course of development it will get bigger and bigger, so it needs to stay simple.

    // CHECK FOR REQUIRED PROPERTIES
    if($properties['step'] == 2)
    {
        $req = array('cshort','cid');
        foreach($req as $required) 
        { 
            if(!validate_var($req,$properties[$req]) || empty($properties[$req])) 
            {
                $step = 1;
            }

        }
    }
    if($properties['step'] == 1)
    {
        $req = array('cshort');
        foreach($req as $required) 
        { 
            if(!validate_var($req,$properties[$req]) || empty($properties[$req])) 
            {
                $step = 1;
                return $st
            }

        }
    }
Why do you only return a value if $properties['step'] == 1? If you could somehow change it so that both return, or both didn't need to, you could make it neater.

$req = array('cshort');
$return = FALSE;

if($properties['step'] == 1) {
    $req[] = 'cid';
    $return = TRUE;
}

foreach($req as $required) {
    $step = 1;
    if($return) {
        return $st;
        /*
          $step? what is this where did it come from?
          Unless you are in a function, you don't need to return.
          Just use $st/$step when you need it since you only ever
          gave it one value. Just check if it isset first.
          If you want to break from the loop, just use break,
          or continue to skip.
        */
    }
}


You mentioned expanding. If this gets too much bigger you could try a switch statement instead of multiple if statements. Assuming the rest don't use the same format, otherwise just tweaking what I gave above should work.

switch($properties['step']) {
    case 1:
        foreach($req as $required) {
        }
    break;
    case 2:
        $req[] = 'cid';
        foreach($req as $required) {
        }
    break;
}