Hi, i use following code
exec("ls -al",$output); while (list($key,$val)=each($output)) { echo basename($val)."<br>"; }
Somehow the last $val prints twice
Why is this happening?
is your $output empty before you call exec?
Yes.
Even if a value was assignred to it, it will still give me the same result.