[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] [PHP] automatisk <br> efter hver 5. billede



On Mon, 15 Dec 2003, Anders M wrote:

> Jeg har en sidde med nogle billeder. Billederne bliver automatisk
> lagt ind paa siden efter hinanden (horisontalt). Indtil videre har
> jeg ikke saa mange billeder (2 :-) ), men naar jeg lige faar gang i
> scanneren kommer der en hel del flere. Derfor vil jeg gerne have
> lavet, saa at der efter hver 5. billede kommer en <br>. Men hvordan
> kan man goere det i php?

I PHP, Perl og C bruger man modulus, det skrives: %

	if ($count % 5 == 0) {
		..
	}

eller den kortere udgave
	if (!($count % 5)) {

/hans
-- 
Hamletsgade 4 - 201, DK-2200 København N, Phone: +45 3582 9079
Schou Industries ApS      http://schou.dk/    CVR: 26 13 44 39
--------------------------------------------------------------
Hvis du har "stjålet" software, så skulle du skamme dig og
aflevere det tilbage!


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *