Mark Steggles
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It was actually my friend's code but I posted it for him as I don't know much about php