Modulation of ionization and structural properties of weak polyelectrolytes due to 1D, 2D, and 3D confinement