Link to home
Start Free TrialLog in
Avatar of Mark Steggles
Mark StegglesFlag for United States of America

asked on

What is the problem with this do while loop?

Page is to display top score by player (this piece works fine) and
highlight where they have gone better or worse than par (green good,
red bad etc)

So I set variable up to select top scores then echo for results
($row_Score) to be displayed - works
Introduce another variable $colourx which checks value from result
($row_Score) and if == 2 (once working I will put another variable for
par) display colour green

So in example attached if value is 2 then colour should be green else
it will be black. This working fine for first row returned but any
subsequent rows just use colour from first row. (attached screenshot
example)

template.php
screengrab.jpg
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark Steggles

ASKER

Thanks Hielo that fixed it.

It was actually my friend's code but I posted it for him as I don't know much about php