Author: Sun motion "" operator ---------------------- we have mentioned above that php (as the mainstream development language) 4 adds a new operator to test whether variables have the same type. Here is an example: ---------------------------------------- Syn author: Sun Sports
"=" Operator
------------------------
As we have mentioned above, php (as the mainstream development language) 4 adds a new = operator to test whether the variables have the same type. Here is an example:
<Tr>
<Td align = "center">
Enter any numeric value or data
</Td>
<Td align = "right">
<Input type = "text" name = "yin">
</Td>
</Tr>
<Tr>
<Td align = "center">
Enter another value or data.
</Td>
<Td align = "right">
<Input type = "text" name = "yang">
</Td>
</Tr>
<Tr>
<Tr>
<Td colspan = "2" align = "center">
<Input type = "submit" name = "submit" value = "Test! ">
</Td>
</Tr>
</Table>
</Form>
</Body>
</Html>
<?
}
Else
{
// If $ submit does exist, the form has been submitted.
// Use the following code for processing
If ($ yin ===$ yang)
{
$ Result = "the values and types of the two variables are identical ";
}
Else
{
$ Result = "two variable values and types are completely different ";
}
Php (as the mainstream development language) also supports a selection syntax for the various control structures currently discussed. For example, you can do this:
The second option is exactly the same as the first one. in this structure, replace the first large arc with a colon [:], remove the second large arc, and end with an "endif" statement.
These are the content of the second part. Next time, we will bring you loops, arrays and more forms-so do not miss it!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service