Hi all,
I wanted to compare the string between 2 area text box a & b, like that
Text area a
65628018
60105091
60107780
60109523
60110250
60110259
60113899
60116739
text area b
60105072
60105091
60107780
60109523
60109625
60110250
60110259
60113899
60116739
60116759
if the string matched , it will appear at area text box c, else , it will appear at area text box d ; Actually i tried 2 function explode() & preg_split() , but those two function seem need to define the string/number first , for example $keywords = preg_split("/[\s,]+/", “6562801894 6562802024 6562805194 6562805351 6562806403 6562808570 6562809240 6562811224 6562812593 6562814191”); it works :
print_r ($keywords)
Array ( [0] => 6562801894 [1] => 6562802024 [2] => 6562805194 [3] => 6562805351 [4] => 6562806403 [5] => 6562808570 [6] => 6562809240 [7] => 6562811224 [8] => 6562812593 [9] => 6562814191 )
But when i use a variable like $a , for example
$keywords = preg_split("/[\s,]+/", “$a”);
print_r ($keywords);
the result will show
Array ( [0] => )
so my question is how can i change to array from string (with a variable $a) like that?
Array ( [0] => 6562801894 [1] => 6562802024 [2] => 6562805194 [3] => 6562805351 [4] => 6562806403 [5] => 6562808570 [6] => 6562809240 [7] => 6562811224 [8] => 6562812593 [9] => 6562814191 )
Then i will use the function array_intersect() to compare two area text box.
Thanks.
Brgds/Brandon Chau