Re: help executing shell commands

From: Date: Tue, 06 May 2003 08:07:02 +0000
Subject: Re: help executing shell commands
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-146495@lists.php.net to get a copy of this message
thanks again, but I've decided to use split and a simple 'wc -l' as the limit. Mike wrote:
$pieces = explode("\n", $test); echo "<pre>"; foreach ($pieces as $value) { echo "add something here => $value"; } echo "</pre>"; Ought to work... -Michael On Mon, 2003-05-05 at 23:15, Fernando Serto wrote:
hi folks, I was trying to figure out how to describe my problem, but I couldn't, so, I decided to show "In Examples Given". I'm doing this: <?php $test = ls /root/; echo "<pre>add something here => $test</pre>"; ?> and the output: add something here => amanda-2.4.4.tar.gz anaconda-ks.cfg bcrypt BestCrypt-1.2-2.src.rpm BestCrypt-1.2-2.tar.gz cfs-1.3.3bf-11.src.rpm cfs.1.4.0.beta2.tar.gz cryptoapi-0.1.0 how can I have an output like this: add something here => amanda-2.4.4.tar.gz add something here => anaconda-ks.cfg add something here => bcrypt add something here => BestCrypt-1.2-2.src.rpm add something here => BestCrypt-1.2-2.tar.gz add something here => cfs-1.3.3bf-11.src.rpm add something here => cfs.1.4.0.beta2.tar.gz add something here => cryptoapi-0.1.0 Thanks in advance! Regards, Fernando


« previous php.general (#146495) next »