To find the number of black horses in the herd, we can start by subtracting the number of white horses from the total number of horses.
The total number of horses is 88, and there are 31 white horses:
\[ \text{Number of black horses} = \text{Total horses} - \text{White horses} = 88 - 31 = 57 \]
Now we can calculate the ratio of black horses to the total number of horses:
\[ \text{Ratio of black horses to all horses} = \frac{\text{Number of black horses}}{\text{Total horses}} = \frac{57}{88} \]
Therefore, the ratio of black horses to all horses is \( \frac{57}{88} \).