Re: array_push

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Frank Arensmeier wrote:
2 sep 2012 kl. 19.48 skrev John Taylor-Johnston:

Why not add two lines of code within the first loop?

$chunks = explode("-30-", $mystring);
foreach($chunks as $chunk) {
     preg_match_all("/News Releases\n(.+)/s", $chunk, $matches);
     foreach($matches[1] as $matched_text_line) {
     	$mynewarray[] = $matched_text_line;
     }
}

Besides the regex, this is pretty basic php.

/frank
Thanks!
I'm still a newbie, (10 years later). I'm still fuzzy when it comes to arrays.
John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux