I have a playful web page, in which there are 2 divs, and in a PHP page, I would like to randomize them, the array rand
part I already know how to do, the problem is time to get the divs HTML and send them to PHP, here's what I have so far:
<html>
<div id="1">bla bla bla</div>
<div id="2">bla bla bla bla bla</div>
</html>
And now, the part in PHP:
<?php
$var1="div 1 iria aqui";
$var2="div 2 iria aqui";
$random = array('$var1','$var2');
echo $random[array_rand($random)];