Code:
<!DOCTYPE html><html>
<body>
<center>
<h1>Elements in an array using foreach loop</h1>
<?php
$players = array("Messi", "Neymar", "Ronaldo", "Oscar","Di Maria");
print_r($players);
foreach ($players as $value) {
echo "<h4>$value <br/></h4>";
}
?>
</center>
</body>
</html>
No comments:
Post a Comment