In my code I\'m trying to call a function that is inside of another function. I\'m trying to pass the $results var to the NVPToArray() function and return the result. After that
You are getting undefined function because you are calling NVPT() which not exists.
You should call NVPToArray() function.
And about the $this, as your $result var is defined inside the function you don't need to use it. You can call it with just $result.
You would use it, if you had something like:
class T {
...
public $result;
function yourF(){
....
echo $this->result;
}
}