gple Posted May 6, 2007 Share Posted May 6, 2007 I am using the array_diff function and the code is below: $result_e = array_diff($team_list, $list); print_r($result_e); When I output the result of this function, it looks like this: Array ( [4] => Astoria A [5] => NAK B [10] => NAK C ) How can I make the output just look like this: Astoria A NAK B NAK C Quote Link to comment https://forums.phpfreaks.com/topic/50247-array_diff-function/ Share on other sites More sharing options...
trq Posted May 6, 2007 Share Posted May 6, 2007 <?php $result_e = array_diff($team_list, $list); foreach($result_e as $k => $v) { echo "$k $v<br />"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/50247-array_diff-function/#findComment-246632 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.