Generate a correct PHP code for the following purpose
Create a function to calculate the area of a rectangle.
```php
<?php
function rectangle_area($length, $width) {
  $area = $length * $width;
  return $area;
}
?>
```
Complete the following task based on the instruction and optional input provided.### Instruction:
Generate a correct PHP code for the following purpose

### Input:
Create a function to calculate the area of a rectangle.

### Output:
```php
<?php
function rectangle_area($length, $width) {
  $area = $length * $width;
  return $area;
}
?>
```