Jump to content


Photo

Newline causing problems


  • Please log in to reply
2 replies to this topic

#1 duncanhall

duncanhall
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 26 September 2006 - 11:46 AM

I have a php/mysql photo gallery system that returns all images in the db. Presently, it outputs in the form of:

<a href="#"><img src="1.png"></a><a href="#"><img src="2.png"></a><a href="#"><img src="3.png"></a><a href="#"><img src="4.png"></a> ..........

For the sake of cleaner html, I add a \n newline after each image, giving me:

<a href="#"><img src="1.png"></a>
<a href="#"><img src="2.png"></a>
<a href="#"><img src="3.png"></a>
<a href="#"><img src="4.png"></a> ..........

which is what I want, but then the images cease to display properly?

Any ideas ?

#2 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 26 September 2006 - 12:30 PM

Here you've posted the resulting code, can you post your php code, so we can see what's generating this result?

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#3 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 26 September 2006 - 03:25 PM

The difference between those codes you showed is that the user will see a space between the images in example 2, but not in example 1.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users