Almost correct
This will work when you define $PREV_DEPT and $PREV_SAL as global variables instead of parameters (that are local to the call).
Make sure you initialise them properly before your first function call.
Almost correct
This will work when you define $PREV_DEPT and $PREV_SAL as global variables instead of parameters (that are local to the call).
Make sure you initialise them properly before your first function call.