tags:

views:

22

answers:

0

Hola! Long time reader, first time asker. Im hoping you folks can help me solve my problem?

I have a php script that looks like this:

system("$command $location");

and that part works fine. However, I would like to then take the results and run another, different $othercommand on the results. I tried doing something like this:

$variable = system("$command $location"); exec($othercommand $variable);

that didnt work, and when i return $variable it is a whole lot more info than just the filename.txt i want. Can i use a regular expression or some output control function to trim $variable down to just the filename.txt?

Thanks!!