What are the potential issues with using multiple while loops in a PHP script, as seen in the provided code snippet?

Using multiple while loops in a PHP script can lead to performance issues, especially if the loops are nested or have a large number of iterations. This can slow down the script and consume more resources than necessary. To solve this issue, consider refactoring the code to use a single loop or optimizing the loops to reduce the number of iterations.

// Example of refactoring multiple while loops into a single loop
$users = ['Alice', 'Bob', 'Charlie'];
$ages = [25, 30, 35];

// Using a single loop to iterate over both arrays
for ($i = 0; $i < count($users); $i++) {
    echo $users[$i] . ' is ' . $ages[$i] . ' years old.<br>';
}