if ($_POST['op_ep_cat'] == 'op_single_ep')
{
$ep_place = $_POST['the_place'];
$eps_array = array();
array_push($eps_array, $ep_place);
}
else if ($_POST['op_ep_cat'] == 'op_category') {
$cat_site = $_POST['the_place'];
$taken_cat_site = file_get_contents($cat_site);
if (preg_match_all('#<div class="content_ep"><a href="(.+?)"#si', $taken_cat_site, $eps_array));
else if (preg_match_all('#<div class="postlist">\s*<a href="(.+?)"#si', $taken_cat_site, $eps_array));
}
foreach(array_reverse($eps_array[1]) as $eps_match)
{
echo 'Arughh!';
}
The above works for the 'op_category'
perfectly, but not for the 'op_single_ep'
... So basically $ep_place
needs to be apart of the $eps_array[1]
, if possible, somehow.. Hopefully any of this makes sense!
I appreciate any help!
print_r($eps_array);
below the preg_push produces:Array ( [0] => http://xxxxx.com/xxxx )
... – Suffice Aug 5 '11 at 17:37