Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $persons = [
- ["name"=> "Anik Saha", "address"=> "Tangail, Bangladesh", "email"=> "anik@bangla-code.com"],
- ["name"=> "Touhid", "address"=> "Dinajpur, Bangladesh", "email"=> "touhid@bangla-code.com"],
- ["name"=> "Fie Chakrobarty", "address"=> "Panchagar, Bangladesh", "email"=> "fie@bangla-code.com"]
- ];
- /**
- for($i=0;$i<count($persons); $i++){
- echo "Name: {$persons[$i]['name']}, Address: {$persons[$i]['address']}, Email: {$persons[$i]['email']}<br />\n";
- } **/
- echo "<table border=\"1\">\n";
- echo "<tr><th>Name</th><th>Address</th><th>Email</th></tr>\n";
- foreach($persons as $person){
- echo "<tr><td>{$person['name']}</td><td>{$person['address']}</td><td>{$person['email']}</td></tr>\n";
- }
- echo "</table>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement