An advanced design of an antenna array with electronic beam switching is proposed for millimeter-wave 5G applications. Electronically reconfigurable phase shifters are employed to control the phase difference between the array elements. Eight rectangular dielectric resonator antennas (DRAs) are excited by using the radiating slots on the surface integrated waveguide (SIW). To realize the phase shifter, a number of electronically switchable Vias, made of liquid metal (LM), are implanted within the SIW. A maximum tilt of $\pm 38^{\circ}$ along the SIW guide is achieved by adjusting the phase difference between the array elements electronically. An impedance bandwidth of 16.2% is maintained for all switching states. About 13.5 dBi peak-gain is achieved from a compact SIW-fed DRA array $(5.3 \lambda \times 0.9 \lambda \times 0.2 \lambda)$, while the scan loss is kept below 3dB over the entire scanning range. Furthermore, the antenna array shows an inherent feature of frequency scanning, in which the beam tilting angle is possible to vary by controlling the operating frequency.