Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $arrayOne = array('0003', '0004', '0005');
- $arrayTwo = array(4, 5, 6);
- $intersect = array_intersect($arrayOne, $arrayTwo);
- // $intersect would then be = "array(4, 5)"
- <?php
- $arrayOne = array('0003', '0004', '0005');
- $arrayTwo = array(4, 5, 6);
- $intersect = array_intersect($arrayOne, $arrayTwo);
- print_r($intersect );
- ?>
- foreach($arrayOne as $key => $value)
- {
- $arrayOne[$key] = intval($value);
- }
- Note: Two elements are considered equal if and only if
- (string) $elem1 === (string) $elem2.
- In words: when the string representation is the same.
Add Comment
Please, Sign In to add comment