[ create a new paste ] login | about

Link: http://codepad.org/ZqGEJQAt    [ raw code | output | fork ]

PHP, pasted on Mar 14:
<?php

$feed_content = Array(
         Array
            (
                'id' => 1,
                'link' => 'http://www.dust-off.com/10-tips-on-how-to-love-your-portable-screens-keeping-them-healthy'
			),
       Array
            (
                'id' => 2,
                'link' => 'http://www.dust-off.com/are-you-the-resident-germaphobe-in-your-office'
            )
);


$arrFeeds = Array
(
    array
        (
            'title' => '10 Tips on How to Love Your Portable Screens (Keeping them Healthy)',
            'link' => 'http://www.dust-off.com/10-tips-on-how-to-love-your-portable-screens-keeping-them-healthy'
	),
    array
        (
            'title' => 'Are You the Resident Germaphobe in Your Office?',
            'link' => 'http://www.dust-off.com/are-you-the-resident-germaphobe-in-your-office'
        )
);

foreach ($arrFeeds as $key=>$value)
{
	$array_search = array('id'=>true,'link'=>$value['link']);
	$search_key = array_search($array_search, $feed_content);
	if (false !== $search_key)
	{
		echo $value['link'], ' found at key ', $search_key, " <br />\n";
	}
}


Output:
1
2
http://www.dust-off.com/10-tips-on-how-to-love-your-portable-screens-keeping-them-healthy found at key 0 <br />
http://www.dust-off.com/are-you-the-resident-germaphobe-in-your-office found at key 1 <br />


Create a new paste based on this one


Comments: