| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2003-08-26 07:17 UTC] iliaa@php.net
  [2003-09-02 18:15 UTC] sniper@php.net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 08:00:01 2025 UTC | 
Description: ------------ I pick the first two products out of the shuffled array for random productviews on a page. I use 3 or more products. With PHP 4.3.2 it works nice (every refresh another two products). With PHP 4.3.3 it doesn't seem to work. Every time the same products. Same PHP.INI file as 4.3.2 (which worked fine). Reproduce code: --------------- $ads = array(); while($product = mysql_fetch_array($arts)) { $ads[] = $product; } shuffle($ads); $prod = $ads[0]; echo ($prod[name]); $prod = $ads[1]; echo ($prod[name]); Expected result: ---------------- The first two array-records are other products every time at refresh. Actual result: -------------- The first two array-records are the same products each refresh.