Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
glupo pitanje.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
_butch



Joined: 10 Sep 2003
Posts: 870
Location: Maichno, Krlovc

PostPosted: 19.10.2003 17:35    Post subject: glupo pitanje. Add user to your forum ignore list Reply with quote

kako napraviti da mi onak lijepo poslozi recimo slike iz baze kak je kod vas u galeriji. onak jedna do druge, da mi recimo 3 idu u jedan red. jel to kako moguce ? Very Happy
ja sam stavio dami prikazuje
echo "$slika";
i onda izbaci

slika1
slika2
slika3..

_________________
FRENCH GUARD: No chance, English bed-wetting types.
I burst my pimples at you and call your door-opening request a silly thing, you tiny-brained wipers of other people's bottoms!
Flikrac
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
emptyhead
mi3.crew


Joined: 03 Sep 2003
Posts: 889
Location: Daleko od Novog Zelanda

PostPosted: 19.10.2003 17:51    Post subject: Add user to your forum ignore list Reply with quote

Je, glupo pitanje :).

To sredis matematikom jel...

1. napravis selekt
2. definiras neki brojac varijablu i stavis je na 0
3. while petlja...
4. zbrojis 1 na brojac
5. otvoris tr ( <tr> , jel)
6. uvalis td kod sa slikom (<td> slika ili stavec </td)
7. provjeris da li je brojac = 3... ako je, zatvoris </tr> i setiras brojac na 0
8. jovo na novo dok imas slija

Ili tako nesto ;).
Back to top
View user's profile Send private message Visit poster's website
njava
mi3.crew


Joined: 25 Aug 2003
Posts: 624
Location: Zagreb

PostPosted: 19.10.2003 18:36    Post subject: Add user to your forum ignore list Reply with quote

evo ti i pseoudokod:

Code:

$num_cols = 3; // po zelji, jel...
if (num_rows) {
  $counter = 0;
  echo '<table...';
  while (next_record) {
    $counter++;
    if ($counter%$num_cols == 1) {
      // prvi item u redu, otvori tr
      echo '<tr>';
    }
    // ispisi item
    echo '<td...' . $podaci;
    if ($counter%$num_cols == 0) {
      // zadnji item u redu, zatvori tr
      echo '</tr>';
    }
    // ako red nije napunjen do kraja, napuni s praznim td-ima
    while ($counter%$num_cols != 0) {
        $counter++;
        echo '<td>&nbsp;</td>';
        if ($counter%$num_cols == 0) {
            // napunjen s korektnim brojem td-ova, zatvori tr
            echo '</tr>';
        }
    }
  }
  echo '</table>';
}


% je modulus operator, daje ostatak dijeljenja 2 broja. u ovom primjeru ostatak 1 znaci da se radi o prvom itemu u redu a ostatak 0 da se radi o zadnjem[/code]
Back to top
View user's profile Send private message Visit poster's website
_butch



Joined: 10 Sep 2003
Posts: 870
Location: Maichno, Krlovc

PostPosted: 19.10.2003 18:52    Post subject: Add user to your forum ignore list Reply with quote

Very Happy Very Happy
thx guys!

_________________
FRENCH GUARD: No chance, English bed-wetting types.
I burst my pimples at you and call your door-opening request a silly thing, you tiny-brained wipers of other people's bottoms!
Flikrac
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group