This isn't critical by any means, but I've got a loop through my users on my website, and i spit out data for each one, something like this
for( $i=1; $i<=999; $i++ ){
$varA = function_a( $i );
$varB = function_b( $i );
$myownvar = 0;
foreach ($varB AS $b) {
$myownvar = ++$myownvar;
}
print($varA.$varB.$myownvar);
}
I end up with a result like
- 1 - user_one: (10)
- 2 - user_two: (4)
- 3 - user_three: (9)
I was wondering if there was a 'relatively simple' way to turn the data around in a way similar to what I've got it, but print the data based on the $this
like this.
- 1 - user_one: (10)
- 3 - user_three: (9)
- 2 - user_two: (4)