php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "shuffle"

How can a random string of letters and numbers be generated using PHP?

To generate a random string of letters and numbers in PHP, you can use the `str_shuffle` function to shuffle a string containing all the possible char...

What is the best way to generate 6 random numbers from 1-49 in PHP without duplicates and keeping the numbers unsorted?

To generate 6 random numbers from 1-49 without duplicates and keeping the numbers unsorted, one approach is to use an array to keep track of the gener...

What are the potential pitfalls of using RAND() in the ORDER BY clause in MySQL queries for PHP applications?

Using RAND() in the ORDER BY clause in MySQL queries for PHP applications can lead to performance issues, especially with large datasets, as it forces...

How can the "ORDER BY RAND()" function in MySQL queries be combined with the "LIMIT" function for better performance in PHP?

When using the "ORDER BY RAND()" function in MySQL queries along with the "LIMIT" function, it can lead to poor performance as it requires the databas...

What are the best practices for generating random numbers in PHP to avoid duplicates and ensure randomness?

Generating random numbers in PHP can sometimes lead to duplicates, especially when generating a large number of random values. To avoid duplicates and...

Showing 201 to 205 of 212 results

‹ 1 2 ... 34 35 36 37 38 39 40 41 42 43 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.