How to create Random Image Background

random image background

Creating Random Image Background in PHP

If you ever want to add a image background in your website and you want to make random every time your visitor visited your site,

Here is a php tutorial.

Step 1: Add this code at the very top.

on the array make sure to the image filename of every background you want to show.

 Step 2: Add this in style

We know style is on our CSS file but for this one we will put this under our code so we can run php code.

 

Source: css-tricks