title: Displaying a new value from array after X time
body: <p>This is a loading page problem in PHP7.1 + Apache2. I have a set of messages which are in an array. Currently, while loading the page any random message is picked up and displayed.</p>
  
  <p>Following is the PHP code used for random array message:</p>
  
  <pre><code>$randomMessage = array (
      'Message 1',
      'Message 2',
      'Message 3',
      'Message 4',
      'Message 5',
      'Message 6',
      'Message 7',
      'Message 8',
      'Message 9'
  );
  $data ['text_page_loading'] = $randomMessage[rand(0, count($randomMessage) - 1)];
  </code></pre>
  
  <p>The problem is the page take a while on slower connections to load. </p>
  
  <p>Is it possible to have a new message from the array to be displayed after every X seconds.</p>