Which one is correct
"If only I had time to eat healthy"
or
"If I had only time to eat healthy"
The message I am trying to convey is that if I had time to eat healthy, I would for sure do it.
Which one is correct
"If only I had time to eat healthy"
or
"If I had only time to eat healthy"
The message I am trying to convey is that if I had time to eat healthy, I would for sure do it.
Changing your example to better explain the differences:
If only I had a hammer to hit you with
I do not have a hammer; but I would hit you if I had one at my disposal.
If I had only a hammer to hit you with
I have more options at my disposal than just a hammer. A bowling ball, a baseball bat, ... I wish I only had one option (the hammer), presumably so I wouldn't be trying to figure out what I should use to hit you.
The second one sounds very weird, even if it is grammatically correct. You need the first example for your current question.
There are cases where it would make sense:
If I had only my boss to worry about, I could leave work early today.
You wish it was only your boss who could stop you from leaving work early; because you know that your boss isn't a problem. However, there are other people (more than just your boss) who are preventing you from leaving work early.
Both sentences are grammatically correct. However, it is the first one that conveys the meaning you are trying get across.
If only... says that the condition that follows, I had time to eat healthy, is the what is preventing you from doing the last (unwritten) part, [I would do so].
In your second sentence, the positioning of only makes it apply to time alone. It's saying that if the only time you had was for eating healthy...
Hope this helps!