Example
Textarea 1:
A123
B456
C789
D012
Textarea 2:
123
789
And when click button will show this result:
A123
C789
You can do something like below,
$data = ["A123","B456"];
$data1 = ["123"];
$newArr = array();
foreach($data1 as $val) {
foreach($data as $fVal) {
if(stristr($fVal,$val)) {
$newArr[] = $fVal;
}
}
}
print "<pre>"; print_r($newArr);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.