Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: PHP | Size: 0.45 KB | Hits: 73 | Expires: Never
Copy text to clipboard
  1. <?php
  2. //Code
  3. while (...) $friends[]=$data2[1];
  4. var_dump($friends);
  5. if (!$rand) sort($friends,SORT_STRING);
  6. mysql_free_result($req);
  7. return $friends;
  8.  
  9. //Résultat
  10. array(4) {
  11.   [0]=>
  12.   string(5) "Amiel"
  13.   [1]=>
  14.   string(8) "MenkiJoe"
  15.   [2]=>
  16.   string(5) "lmttm"
  17.   [3]=>
  18.   string(6) "Adrien"
  19. }
  20. NULL
  21. <br />
  22. <b>Warning</b>:  sort() expects parameter 1 to be array, null given in <b>/homez.312/winky/www/lib.php</b> on line <b>378</b><br />
  23. ?>