zizzu Posted March 21, 2011 Share Posted March 21, 2011 Hello i am trying to execute a linux program for every line of a textarea $text = $_POST['links']; $text = htmlspecialchars($_POST['links']); $text = nl2br($text); foreach(explode("\n",$text) as $row) { $result = NULL; $command = 'the command'; exec($command,&$result); echo $result[0]."<br>"; } but this always print the result for last line of text area for example if there are 3 lines it print 2 blanks and 1 result... whats wrong?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.