Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I tried your solution and doesn't work for me since $c returns only the result from the example is "elephant" and "pigeon". Commented Mar 29, 2020 at 12:10
  • Trying to use the latter suggestion you made. Almost solved it but it doesn't return back to the else statement after printing the empty values. Commented Mar 29, 2020 at 13:09
  • 1
    @sudo it is very difficult to help you if you can't give us a reproducible example. Please edit your question and show us how you are populating your arrays and also show us what output you want to see. At the moment, we need to guess. Commented Mar 31, 2020 at 10:00