einfache Schleife geht nicht

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • einfache Schleife geht nicht

    WARUM IN ALLER WELT FUNTIONIERT DIESE EINFACHE PHP ANWEISUNG NICHT????

    bin neu in dem Genre und bekomme diese einfach schleife einfach nicht hin! Ich möchte mit ihr ein paar Bilder nach der reihe aufrufen lassen!

    PHP Code:
    <?php        for ($i=0$i<5$i++) {
                echo 
    "<img src=\"images/menu/button"$i".jpg\">";       
     }    
    ?>
    www.clansow.de/versuch/menu.php ---> livedemo

    mfg me

  • #2
    WARUM IN ALLER WELT FUNTIONIERT DIESE EINFACHE PHP ANWEISUNG NICHT????
    NICHT SO LAUT!!!

    Eigentlich solltest du nen Parse-error erhalten.

    versuch mal

    'text' . $i . 'text';

    Comment


    • #3
      Danke! =) hat funktioniert! PHP macht wieder spaß

      Comment


      • #4
        Nicht so sauber wie TobiaZ Lösung, müsste aber auch funzen
        PHP Code:
        <?php       
        for ($i=0$i<5$i++) {
            echo 
        "<img src=\"images/menu/button$i.jpg\">";       
        }    
        ?>
        Gruss

        tobi
        Gutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten

        [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
        Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)

        Comment

        Working...
        X