Help =)

Discussion in 'PHP' started by Licensescript.com, Mar 18, 2009.

  1. #1
    Hi,

    I was trying to make a simple script to create lots of folders. The script below doesnt work please can someone amend! Thanks

    <?
    
    $arr=array('testfolder', 'testtwo');
    $value = each($arr);
    mkdir($value);
    
    ?>
    PHP:

     
    Licensescript.com, Mar 18, 2009 IP
  2. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $arr = array('testfolder', 'testtwo');
    foreach ($arr as $folder)
       mkdir($folder);
    Code (markup):
     
    SmallPotatoes, Mar 18, 2009 IP
  3. Licensescript.com

    Licensescript.com Well-Known Member

    Messages:
    287
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Ahh i did that but i put the {} in my mistake! Thanks big help :p works perfect
     
    Licensescript.com, Mar 18, 2009 IP