Plug-in hybrid electric vehicles (PHEVs) are becoming increasingly widespread due to the environmental and economic benefits. However, high penetration of PHEVs may overload a electricity grid at peak hours and increase charging costs for PHEVs. In this paper, we first formulate the PHEVs charging coordination problem as a two-stage constrained optimization problem. Then we develop an optimal charge control scheme to solve this optimization problem within two stages. In the first stage, the demand-side management (DSM) principle is adopted to flatten the power demand curve on low-voltage transformer (LVT) controller in the electricity grid. In the second stage, the consensus-based algorithm is applied to minimize the total costs for PHEVs charging. The advantages of the proposed scheme are that it achieves the minimized total charging cost for all PHEVs while flattening the power demand curves for the gird, and it is also easy to implement in practice. Numerical simulations are presented to show the effectiveness of our scheme.