write php function that acceptsany number and checks, if the number is even then the function should display that number and the next following 5 even numbers, if the number is odd then the function should display the number and the text following 10 odd numbers.

Votes + Comments
Thanks for the homework assignment, but I'm not in school anymore.
4 Years
Discussion Span
Last Post by masterjiraya

So, which part is the question?

How much PHP do you know so far, what PHP code do you have so far? DaniWeb isn't designed for you to get your homework done for you.
Show us your current progress, and then we can answer on a specific part of the question.

Votes + Comments
couldn't agree more

I have to agree.

Are you asking a question?

If you are unsure on how to ask a well formed question, please refer to the link in my sig.

Thank you for your understanding.

Edited by Squidge


I also agree with them.Atleast show the code that you have done so far.We are not here to do your homework.

Any way for this,Take input from user using input textbox and then just check if number is divisible by 2(even),if yes then use for loop and print using echo five numbers after that number incrementing by 2 else echo 10 numbers incrementing by 2.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.