Home  >  Article  >  Backend Development  >  How to express division in php

How to express division in php

(*-*)浩
(*-*)浩Original
2019-09-06 10:22:443332browse

How to express division in php

Divide is one of the arithmetic operators in php, which is represented by / (slash), for example: $x / $y, get $x and $y quotient.

Example: (Recommended learning: PHP programming from entry to proficiency)

<!DOCTYPE html>
<html>
<body>

<?php
$x = 17;  
$y = 8;

echo $x / $y;
?>  

</body>
</html>

Output:

2.125

The above is the detailed content of How to express division in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn