I have this code and it works:
<html>
<head>
<title>Exercitii</title>
</head>
</head>
<body>
<?php
function no_name($paramOne) {
$param = array("mihai", "jon", "michael");
$param[] = $paramOne;
foreach($param as $value) {
echo($value . " sunt cel mai bun " . "<br/>");
}
}
$string = "dan";
no_name($string);
?>
</body>
</html>
Output:
mihai sunt cel mai bun
jon sunt cel mai bun
michael sunt cel mai bun
dan sunt cel mai bun
But how can I add more names like: "costel", "mihaela", "george" to one array and call function with array parameter to further update names?