Print each value of the array in php

technical talkiess
0

Print each value of the array in php

 <!DOCTYPE html>

<html>

<body>


<?php

$test_array = ['vishal','usrate','lakhan','test','rahul'];

foreach($test_array as $key =>$value){

echo "<h1>The key is . - $key - </h1>";

echo "<h2> And the value is - $value</h2>";

}

?> 


</body>

</html>


Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)