Friends, How do you echo the value of php array in html.Today I will tell you through this tutorial.
fetch php array value in html, extract php array value using foreach() loop in html, display php array value in html table
If you are programming in php, it cannot happen that you do not use array. We use loop to echo the value of php array in html.
To get the value in html, echo it to html using foreach() loop.
<!DOCTYPE html> <html> <head> <title>How to Display PHP Array Value in HTML?</title> </head> <body> <h1>How to Display PHP Array Value in HTML?</h1> <?php foreach ($urls as $url){ echo'<b>'. $url['title']."</b>"; echo'<p>'. $url['description'].'</p>'; } ?> </body> </html>