Urgent help needed regarding php arrays

Discussion in 'PHP' started by basscleff, Aug 15, 2009.

  1. #1
    i have problem with php ..

    i have form index.html with


    here is the code of acc.php

    now here is thing if i put this in text area in index.html
    
    Username: asdasd
    Password: pass
    
    Username: sdfsdfd
    Password: sfsdfsd
    
    Username: lasd
    Password: eniasd2
    Code (markup):
    im getting only teh echo output as asdasd pass

    its not showing everthing ..it should be showing like

    asdasd pass
    sdfsdfd sfsdfsd
    lasd eniasd2

    im not good with php at all ..so please help me out:)
     
    basscleff, Aug 15, 2009 IP
  2. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What was the purpose of doing this?

    $newuser=nl2br($list);
    $newuser=explode("\n",$list);

    No point in the first line since it's overriden by the second one (and even if you changed $list to $newuser in the second one, spliting by \n wouldn't work after having converted nl to brs).
     
    kblessinggr, Aug 15, 2009 IP