In the past few years neutron-scattering experiments have shown very intriguing stripe correlations of spins and holes in hole-doped La2NiO4 and La2CuO4. As yet, no x-ray-diffraction experiment has confirmed the neutron results and the topic is still controversial. In this paper we report the observation of stripe correlations of holes by x-ray diffraction. The experiments were performed in Laue geometry at the hard-x-ray beamline BW5 at HASYLAB on a crystal of La1.775Sr0.225NiO4 which was previously studied by neutron diffraction. Temperature dependences of the intensities and wave vectors of the charge-density-modulation peaks were characterized and found to be in good agreement with the neutron-scattering results. Interestingly, weak, temperature-dependent scattering was also observed at positions consistent with nonresonant x-ray magnetic scattering from the spin correlations; however, a definitive determination of its origin remains lacking.