Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is this possible - data manipulation

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
US
I have the following information in my db:

a b c
2003 5 1
2003 9 1
2004 2 1
2004 6 1
2004 8 2
2005 4 2

I'm currently displaying totals as such:

a b c
2003 14 1
2004 8 1
2004 8 2
2005 4 2

What I am wondering or would like to do is display like this:

a b c
2003 14 1
2004 8 1
- 8 2 <- where either a dash or a space will
2005 4 2 substitute the duplicate date


Is that possible?

Thx
 
Just do a simple if sentence:
Code:
$year = 0;
if ($year != $row['year'])
{
   echo $year;
}
else
{
   echo "-";
}
$year = $row['year']
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top