The directed movement of phosphate across a membrane by means of some agent such as a transporter or pore.