mspurple Posted January 16, 2023 Share Posted January 16, 2023 I'm trying to create a PHP script using a for loop to display in a column all odd numbers between 1 and a given value by the user. sample output should be this : Quote Link to comment https://forums.phpfreaks.com/topic/315807-odd-column/ Share on other sites More sharing options...
Barand Posted January 16, 2023 Share Posted January 16, 2023 You will basically need 2 things a for() loop the modulo (%) operator (optional) Quote Link to comment https://forums.phpfreaks.com/topic/315807-odd-column/#findComment-1604719 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.