answersLogoWhite

0

How do you create an odd or even script using PHP?

Updated: 8/16/2019
User Avatar

Wiki User

15y ago

Best Answer

To determine whether a given number is odd or even:

function odd_even($i)

{

return ($i % 2 == 0 ? 'even' : 'odd');

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create an odd or even script using PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you create a web mail script using PHP?

You can use phpMailer() Or, you can use mail() PHP function to send emails via PHP script.


How do you create a PHP script?

To create a PHP script all you have to do is create a new file, then save the file as "filename.php". It must have a .php file extension.After that open the file and put in the PHP tags like shown.Then you write your PHP script within those tags and upload to your web space and check it out.


What is harder to create from scratch a php amazon clone script or a php youtube script?

In Core-PHP I would assume both are difficult. But between the two Amazon clone would be a bit harder. Ideal thing would be to use Magento to create an Amazon type site.


How can you execute a PHP script using command line?

2 Methods: 1. You execute your php binary (in linux, make sure you have php-cli installed) and pass the script as an argument. EG ($: /usr/bin/php /home/user/script.php) 2. A sh'bang in the first line of your script, with the full path of your php executable: #!/usr/bin/php -q <?php ScriptStuff(); ?>


Where can one find a guide on how to make a login php script?

The best place to find a guide on how to make a login script in php is the PHP Easy Step website. They offer a step by step tutorial on how to create login scripts.


What is the Malay-utf-8.inc. php file?

This particular file is a file specific to the PHP program or script you are using. It is not a "php system file".


How can you run a PHP script?

A php script can only be executed within a Web server that runs php.


What is the GET method in PHP?

The GET method in PHP allows you to grab information from the URL to use in your script.For example, say you are on the URL index.php?id=1 you could then in the PHP script grab the id using the GET method to use in your script.


Why do we use Php?

PHP is an Open Source Scripting Language. We can create Web Pages and Web Applications using PHP.


How do you transfer money from PayPal to PayPal using PHP?

As far as I'm aware you can't transfer from one account to another using a PHP script, you would have to login and do it manually.


What are semantics in PHP?

PHP is related with HTML. HTML can be included into PHP script as well as PHP script can be included into HTML code. PHP begins and ends with <?php ?>. PHP is mix of few languages so semantics is mixed too.


How do you create a database using PHP?

The following are the fundamental procedures for creating a MySQL database with PHP: As demonstrated in this article, connect to the MySQL server from your PHP script. If the connection is successful, construct a database using SQL and save it in a string variable. Carry out the query. To learn more about data science please visit- Learnbay.co