Quentin Rey
Quentin Rey

Reputation: 120

How to use exec() to display more than one value?

I'm using php function exec() to execute a shell script. The shell script return 3 echo :

[.. SCRIPT ..]
echo $mp3
echo "$title"
echo $img

How can I recover them separately to use them ?

For now, when I print the output, only $img is printed.

Thanks

Upvotes: 1

Views: 56

Answers (1)

Max
Max

Reputation: 891

First of all, your script doesn't return 3 values.

Instead, you echo 3 variables. I think that the 2 first are not initialized.

Upvotes: 1

Related Questions