Whats wrong in textarea foreach ?

Discussion in 'PHP' started by CNMEDYA, Sep 2, 2010.

  1. #1
    Hello, my code:

    $divid=$_POST['divid'];
    $divtag=preg_split('/(\r?\n)+/', $divid);
    foreach($divtag as $idse)
    {
    $csss = '
    <!-- '.$idse.' start -->
    <div id="'.$idse.'">

    </div><!-- '.$idse.' finish -->
    ';
    $csscode = '
    #'.$idse.' {
    }
    ';
    }

    In this code if i put

    lorem
    ipsum
    dolor
    sit
    amet

    into textarea it writes foreach $csss = '<!-- amet start -->
    <div id="finish">

    </div><!--amet finish -->

    Why others not showing while :confused:

    Sorry for my bad English :(
     
    CNMEDYA, Sep 2, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    Post the relevant code (ie. the textarea code).
     
    danx10, Sep 3, 2010 IP