PDA

View Full Version : please help with stray comma


malum
22nd of May 2003 (Thu), 12:06
On my photo.php page it is putting a comma in just before the text.
I have searched and searched the php to try and find out why (I don't know any php) but I can't figure it out for the life of me.
I have hacked the php about a bit to get rid of the photographer info etc but this comma is driving me nuts


http://***removed***/photo.php?photo=367&exhibition=3

Is an example (see on the left just under the main photo)
Below is the produced HTML (with the comma in it) but a search of the php doesn't reveal said comma

document.write ("");



,


Can someone please help?

Great software by the way.

Pekka
22nd of May 2003 (Thu), 18:22
It must be in code before line 1511

if ($showdetail == "1")


Most likely the line

print " (" . $ownerlocation . ", " . $ownercountry . ")";

Just comment that out like

// print " (" . $ownerlocation . ", " . $ownercountry . ")";

and see.

malum
23rd of May 2003 (Fri), 09:09
To my shame I didn't realise I could comment out lines, so I have learned something today.

I had removed large parts of the code so my lines didn't match up with the original. I went back to the original and started again (this time commenting the unneeded lines out)

The comma is still there but at least the above process has enabled me to learn why:

It is the comma that separates the categories if the photo is in more than one category. How is this put in and how do I get rid of it?

Many thanks

EDIT: it was lines 1713 and 1715 which I have now commented out

1713 //foreach ($category_array AS $c)

1715 //print $c;



Just in case anyone else has the same problem

Thanks for the help