University Crest

[wlug] a very simple php question that just has my brain stumped.

 
wlug archive index About the wlug list Mailing lists home
To The University of Waikato HomepageWaikato Home > Waikato Mailing Lists > wlug Info > wlug archives
Orion Edwards orion@c...
Wed Mar 12 23:38:19 NZDT 2003


Sigh
$variable = `route`;
that is all.

$variable now contains all the output with newlines etc so is very
simple to do a str_replace on or somesuch.

-----Original Message-----
From: kyle carter [mailto:kyle@f...] 
Sent: Wednesday, 12 March 2003 10:42 p.m.
To: wlug
Subject: Re: [wlug] a very simple php question that just has my brain
stumped.

I could kiss you.. but i wont..

yeah.. i just found the array option of exec a few seconds before i got
your 
email.. thanks.. all is working... however it seems like a pain in the 
butt... i only wanted a small amount of processing on the output of one
small 
program <sigh>
just one of those weird situations i guess...

On Wed, 12 Mar 2003 22:38, Matt Brown wrote:
> Hi,
>
> Actually exec can give you an array of all of the output from a
command
>
> string exec ( string command [, array output [, int return_var]])
>
> so
>
> exec("route", $output);
>
> for ($i=0;$i<count($output);$i++) {
> 	echo $output[$i] . "<br>";
> }

Kyle Carter
_______________________________________________
wlug mailing list
wlug@l...
http://list.waikato.ac.nz/mailman/listinfo/wlug




More information about the wlug mailing list
NOTICE: This is an archive of a public mailing list. The University of Waikato is not responsible for its contents.

The University of Waikato - Te Whare Wananga o Waikato