The magnetic behavior of the low-dimensional phosphates ͑Sr, Ba͒ 2 Cu͑PO 4 ͒ 2 and BaCuP 2 O 7 was investigated by means of magnetic susceptibility and 31 P nuclear magnetic resonance ͑NMR͒ measurements. We present here the NMR shift, the spin-lattice ͑1/T 1 ͒, and spin-spin ͑1/T 2 ͒ relaxation-rate data over a wide temperature range 0.02 K ഛ T ഛ 300 K. The temperature dependence of the NMR shift K͑T͒ is well described by the S =1/2 Heisenberg antiferromagnetic chain model ͓D. C. Johnston, R. K. Kremer, M. Troyer, X. Wang, A. Klümper, S. L. Bud'ko, A. F. Panchula, and P. C. Canfield, Phys. Rev. B 61, 9558 ͑2000͔͒ with an intrachain exchange of J / k B Ӎ 165, 151, and 108 K in Sr 2 Cu͑PO 4 ͒ 2 , Ba 2 Cu͑PO 4 ͒ 2 , and BaCuP 2 O 7 , respectively. Deviations from Johnston's expression are seen for all these compounds in the T dependence of K͑T͒ at low temperatures. 31 P is located symmetrically between the Cu ions and fluctuations of the staggered susceptibility at q = / a should be filtered out due to vanishing of the geometrical form factor. However, the qualitative temperature dependence of our 31 P NMR 1 / T 1 indicates that relaxation due to fluctuations around q = / a ͑but / a͒ have the same T dependence as those at q = / a and apparently dominate. Our measurements suggest the presence of magnetic ordering at 0.85 K in BaCuP 2 O 7 ͑J / k B Ӎ 108 K͒ and a clear indication of a phase transition ͑divergence͒ in 1 / T 1 ͑T͒, 1/T 2 ͑T͒, and a change of the line shape is observed. This enables us to investigate the one-dimensional ͑1D͒ behavior over a wide temperature range. We find that 1 / T 1 is nearly T independent at low temperatures ͑1 Kഛ T ഛ 10 K͒, which is theoretically expected for 1D chains when relaxation is dominated by fluctuations of the staggered susceptibility. At high temperatures, 1 / T 1 varies nearly linearly with temperature, which accounts for contribution of the uniform susceptibility.