Remember that
1 ft=12 in
1 yd =36 in
so
The garden is 23 ft by 31 ft
Convert to inches
23 ft=23*12=276 in
31 ft=31*12=372 in
Find out the volume
V=(276)*(372)*(4)
V=410,688 in3
Convert to cubic yards
410,688 in3=410,688*(1/36)^3=8.80 cubic yards
Remember that
The store only sells in increments of 1/4 cubic yards
so
The volume is 9 cubic yards