can PWM and Resistance be exchanged?

depending on the voltage divider on the reference pin determines the voltage out... how is that resistance produced digitally?

I am assuming the question is:-
I have a reference voltage on a LM317t an adjustable voltage regulator. Currently in my circuit it is produced by a potential divider, how can I make that reference voltage variable under the control of an arduino. Will PWM help?

In which case the answer is yes, remove the potential dividor and feed the PWM into an RC filter to smooth it, this will then produce a variable voltage you can then apply as a reference to your LM317t .

If this was not your question then please post again.