I looked in the forum and found a lot of almost same topics but not what I am exactly looking for:
I have 1 array like:
$filterNames : Array
(
[0] => 11424205969default-img.jpg
[1] => myimage.png
[2] => media/14-15/11235231video1.flv
[3] => likemedia/10-12/233569video2.mp4
)
Another like:
$files : Array
(
[0] => /mypath/materiales/media/14-15/video1.flv
[1] => /mypath/materiales/likemedia/10-12/video2.mp4
)
I need to get the array of the values wich are not already existing in 1st array. But as the values are not identical I can't get it work.
Something like:
function array_check($files, $keyword) {
$out = array();
foreach($files as $index => $string) {
if (strpos($string, $keyword) !== FALSE) {
foreach ($filterNames as $namesF) {
$out[] = array_check(array($files,'stackoverflow'),$namesF);
}
}
}
}
My question is diferent on the one presented by AbraCadaver because the values of arrays are not exactly same, in the example, they are all same (numbers)
I need an output array with only the single values like they are in the $files array, with exact path. But not if present with another path in the 1st array. Do I explain myself ? thanks for helping guys cheers