PHP Exercises: Check whether a given array of integers contains 5's and 7's
Write a PHP program to check whether a given array of integers contains 5's and 7's.
Sample Solution:
PHP Code :
Sample Output:
bool(true) bool(true) bool(false)
Flowchart:
PHP Code Editor:
Contribute your code and comments through Disqus.
Previous: Write a PHP program to check if a given array of integers contains 5 next to a 5 somewhere.
Next: Write a PHP program to check if the sum of all 5' in the array exactly 15 in a given array of integers.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics