Multi-line return from exec() ?

michaelsanford

Translator, Web Developer
I want to include this in my web site:

PHP:
echo exec("/usr/games/fortune"):

But as you can imagine it only returns the last line.

Ideas?

EDIT Got it:

PHP:
$fortune = system("/usr/games/fortune");
echo $fortune[0];
 
Back
Top