I think that I have had to do something like this before. I believe what I
ended up doing was creating an array for each, in your case, title. The
array would not hold the title names but rahter the URLs. What you would do,
is create a for loop before the for loop that you listed prior. In this loop
you would run through the rows and have a variable called $lastUrl that
would hold the value of the URL in the previous row. Then you check the
current row and if it equals the the $lastUrl then just concatenate it to
the previous array value. If it doesn't equal, than insert a new item in the
array.
$count = 0;
for( $i = 1; $row = mysql_fetch_array($result); $i++ )
{
$lastUrl = '';
if($lastUrl == $row['url'])
{
$row[$count] .= $row['url'];
}
else
{
$row[$count += 1] = $row['url']
}
}
With this method you may have to do the same with Title because you will
want the array's to match up. See if this works.
-Kyle Hayes
"leegold2" <le*****@nospam.net> wrote in message
news:wA0bd.5245$gd1.3993@trnddc08...
Let's I do a mysql query and then I do a,
for( $i = 1; $row = mysql_fetch_array($result); $i++ ) {...}
and it gives me this:
PageID Title URL Description
1 lee's gogle1.com This is lee's website.
1 lee's gogle2.com This is lee's website.
2 Jon's yaho1.com This is Jon's website.
2 Jon's yaho2.com This is Jon's website.
But I want this:
PageID Title URL Description
1 lee's gogle1.com gogle2.com This is lee's website.
2 Jon's yaho1.com yaho2.com This is Jon's website.
How??? I'm at a loss to figure this out! Thanks,
Lee G.
Wash DC