What about peaceable journeys in and out?

I once asked a New Hope Police Officer about trips into New Jersey. If I am in New Hope which is on the border to New Jersey in the daytime and friends invite me to their home in NJ. What do I do with my gun. He claimed that all I need to do was put it in the trunk until I came back into PA. My understanding is that I must be going to or from a range or match or I must be passing through.