We have produced lateral porosity modulation in porous silicon layers on a micron scale. Using the photosensitivity of the etching process and optical interferences, stripes are formed periodically on the top but also in the depth of the layer depending on the illumination wavelength. The periodicity of the structure is easily modified by changing the wavelength or the incident angles of the two laser beams used to create the modulated illumination. By rotating the sample, two dimensional structures have also been obtained. The samples formed by this procedure are characterised by light diffraction and photoluminescence both of which show the alternance of high and low porosity ranges. With this kind of in-depth lithography, easy and very cheap fabrication of porous silicon gratings promises a large potential range of applications of this material to integrated optics and photonics.