How to Execute a Specific Part of a Function I am building a function in a custom module, and I want to be able to execute only a specific part of that function. 

I am starting with the hook_node_api to see if an event occurs, and if that event occurs, I want to execute a only a specific part of that custom function.

function mymodule_nodeapi(&amp;$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {

    case 'presave'
    if (  $node-&gt;type == 'property' ){
        $old = node_load($node-&gt;nid);
        if($old-&gt;field_realtor_reference[0]['uid'] == NULL &amp;&amp; $node-&gt;field_realtor_reference[0]['uid'] !== NULL){
               mymodule_tn_complete($node);  
        }
      }

      break;
  } 
}  

function mymodule_tn_complete( $node)
{
  //Do something 
  //Do Something Else


}
If I'm reading you right you're asking a basic program flow-control question.  In PHP, like most programming languages, you can use flow control statements like switch and if to only execute certain blocks of code, or move some blocks into separate functions.

Since it's your own function you're calling here it completely up to you how to handle it. As you gain experience you'll learn ways to determine what to separate out into unique functions and what to just use if statements to control.

To use an if statement, you'll probably need to add a parameter to your function to let you determine which pieces to execute.