On 06/14/2011 01:30 PM, Ashley M. Kirchner wrote:
> if ($array = preg_grep('/^ wmax = /', $output)) {
> $array = array_values($array);
> $wmax = explode(', ', $array[0]);
> }
Sorry, didn't have a way to test when I posted. So you've posted two
different expected outputs and I misread the first. You want a string
of only the coma separated numbers? If so:
if ($array = preg_grep('/^ wmax = /', $output)) {
$wmax = array_shift($array);
}
If you want to get rid of the wmax = or add the { } or whatever use
str_replace() and/or concat then on.
--
Thanks!
-Shawn
http://www.spidean.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php