2 Samuel 18:4

Amplified Bible (AMP)
Then the king said to them, “I will do whatever seems best to you.” So the king stood beside the gate [of Mahanaim], and all the army went out in groups of hundreds and of thousands.

Read 2 Samuel 18:4 in other translations