| SitePoint Sponsor |

<?php//Kyle Wolfeecho devBlog("My Dev Notes");
I dont... understand?
What output do you desire?
Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.
Assumption: You mean you want any values of $a2 whose number element does not exist in $a1;
Something like...
, perhaps?PHP Code:$a3 = array_filter($a2,function ($item) { return !in_array($item['number'],$a1); });
(Note: Untested)
Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

No way to use array_diff? I want anything in $a1 that does not exist in $a2['numbers']
<?php//Kyle Wolfeecho devBlog("My Dev Notes");

but values 1 and 2 DO exist in $a2
do you mean you want to return any values in $a2 that don't exist in $a1
if so,
this might help:
returns:PHP Code:$a1 = array("1", "2");
$a2 = array(array("numbers" => "1", "something else" => "foo"), array("numbers" => "2", "something else" => "bar"));
$a3 = array_merge_recursive(array_diff($a2[0],$a1),array_diff($a2[1],$a1));
echo '<pre>';
print_r($a3);
echo '</pre>';
Code:Array ( [something else] => Array ( [0] => foo [1] => bar ) )
Detect file changes remotely. SimpleSiteAudit is an early
warning anti-hacker system which sends an alert on detection.
PHP Find Orphan Files - Finds all the unreferenced files on your site.
Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.
Bookmarks