Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Shuffle Function not working on refresh in IE8 and Chrome
    primarykey
    data
    text
    <p>I am using the following php shuffle function code to display a list of images:</p> <pre><code> &lt;?php $images = array(); $images['image1'] = array("id" =&gt; "sales1", "href" =&gt; "#salesperson1", "src" =&gt; "salesteam/salesteam-jessie.png"); $images['image2'] = array("id" =&gt; "sales2", "href" =&gt; "#salesperson2", "src" =&gt; "salesteam/salesteam-anthony.png"); $images['image3'] = array("id" =&gt; "sales3", "href" =&gt; "#salesperson3", "src" =&gt; "salesteam/salesteam-nicole1.png"); $images['image4'] = array("id" =&gt; "sales4", "href" =&gt; "#salesperson4", "src" =&gt; "salesteam/salesteam-kevin.png"); $images['image5'] = array("id" =&gt; "sales5", "href" =&gt; "#salesperson5", "src" =&gt; "salesteam/salesteam-christi.png"); $images['image6'] = array("id" =&gt; "sales6", "href" =&gt; "#salesperson6", "src" =&gt; "salesteam/salesteam-thomas.png"); $images['image7'] = array("id" =&gt; "sales7", "href" =&gt; "#salesperson7", "src" =&gt; "salesteam/salesteam-melissa.png"); $images['image8'] = array("id" =&gt; "sales8", "href" =&gt; "#salesperson8", "src" =&gt; "salesteam/salesteam-nicole2.png"); shuffle($images); foreach ($images as $singleimage) { $singleid = $singleimage['id']; $singlehref = $singleimage['href']; $singlesrc = $singleimage['src']; echo "&lt;li&gt;&lt;a id=\"$singleid\" href=\"$singlehref\"&gt;&lt;img src=\"$singlesrc\" /&gt;&lt;/a&gt;&lt;/li&gt;"; } ?&gt; </code></pre> <p>It does not work when hitting refresh in either IE8 or Chrome. It does work just fine in Firefox. Is it a cache issue? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload