php Array
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
table,td,tr,th{
border:1px solid red;
}
</style>
</head>
<body>
<?php
$a=array(
'ducat'=> array('php','java','.net'),
'akash'=>array('jee','neet','pmt'),
'arena'=>array('photoshop','3dmax','3dmaya')
);
// print_r($a);
// print_r($a);
echo "<table>";
echo "<tr>";
foreach($a as $key=>$data){
echo "<th>" .$key."</th>";
}
echo "</tr>";
foreach($a as $key=>$data){
echo "<tr>";
foreach($data as $value){
echo "<td>".$value."</td>";
}
echo "</tr>";
}
echo "</table>";
?>
</body>
</html>
Comments
Post a Comment