Array comparison problem This post was last edited by u012984377 from 2014-08-0811: 21: 42 to implement string & nbsp; off-road, City SUB & nbsp; (length16) comparison with wjc_title & nbsp; & gt; & nbsp; string & nbsp; 2 car & nbsp; (lengt array) in the array
This post was last edited by u012984377 at 11:21:42
Implementation string 'cross-country, city SUB' (length = 16)
Compare it with the 'WC _ title' => string '2-compartment car '(length = 13) in the array to see if the conditions are met,
How to do it? I just learned PHP soon.
------ Solution --------------------
Do not map, paste your array.
Which of the following conditions is met?
------ Solution --------------------
$ Ar1 = array ('A1', 'A2 ');
$ Ar2 = array (
Array ('WC _ id' => '12', 'WC _ title' => 'A1 '),
Array ('WC _ id' => '23', 'WC _ title' => 'sfdss '),
);
Function foo ($ item ){
Global $ value;
Return $ value = $ item ['wjc _ title'];
}
Foreach ($ ar1 as $ value ){
Echo $ value, '', array_filter ($ ar2, 'Foo ')? 'In': 'not', PHP_EOL;
}A1 in
A2 is not present