function info($name, $email){
echo "$name <br />";
echo "$email";
}
<?php
function info($name, $email){
echo "$name <br />";
echo "$email";
}
info("Admin", "admin@gmail.com");
?>
<?php
function employee_info($employee_name, $salary, $gender)
{
echo "Employee_Name : $employee_name <br />";
echo "Salary : $salary <br /> Gender. $gender";
}
employee_info("Jone", "15000", "Male")
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHP string replace function</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="text-center">
<h1>Is it okay to close a PHP tag inside a function?</h1>
</div>
<br>
<h3>Example 1:</h3>
<div class="well">
<?php
function info($name, $email){
echo "$name <br />";
echo "$email";
}
info("Admin", "admin@gmail.com");
?>
</div>
<h3>Example 2:</h3>
<div class="well">
<?php
function employee_info($employee_name, $salary, $gender)
{
echo "Employee_Name : $employee_name <br />";
echo "Salary : $salary <br /> Gender. $gender";
}
employee_info("Jone", "15000", "Male")
?>
</div>
<br>
</div>
</body>
</html>