PHP - Split list and print

Asked

Viewed 67 times

1

I’m creating a script for study and I need to split the list into array. So you can be informed in for or foreach.

That in each tested account is informed the result on the screen and so on...

I’m using a for script that only prints on screen when all accounts are tested..

Script:

if(isset($_POST['btn'])){
        $lista = $_POST['emails'];

        $linha = explode("\n", $lista);
        $size = count($linha) -1;

        for($i=0;$i<=$size;$i++){
            $conta = explode("|", $linha[$i]);
            $email = $conta[0];
            $senha = $conta[1];

            $a = new cURL;
        }
    }

Sample list:

Minha lista

  • 2

    That would be https://answall.com/a/270638/99718 ?

  • Just like that! Thank you

  • A new error happened. Whenever I test more than 1 drive the result goes wrong. How can I fix?

  • What do you mean "wrong"?

  • The accounts that should come out with the result "approved" are coming out "disapproved" and vice versa. However when put 1 unit the result comes out correct

  • How about this "approved"? If possible put part of the code that can be tested, so it is easier to understand.

  • https://answall.com/questions/288300/php-erro-for-e-function

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.