oceanwap
New Member
- Messages
- 24
- Reaction score
- 0
- Points
- 0
I have an array in which I stores key and values using post method, so let's assume it looks like this
Now for fetching values I can do this
So I get the following html
But I want output like this, so document looks fancy
How I can achieve this?
PHP:
$links = array("PHP" => "http://",
"Zend" => "http://zend.com","Mysql" => "http://mysql.com",
"Ubuntu" => "http://ubuntu.com");
PHP:
foreach($links as $title => $link) {
echo "<tr><td><a href=\"$link\">$title</a></td></tr>";
}
HTML:
<tr><td><a href="http://php.net">PHP</a></td></tr>
<tr><td><a href="http://zend.com">Zend</a></td></tr>
<tr><td><a href="http://dev.mysql.com">Mysql</a></td></tr>
<tr><td><a href="http://ubuntu.com">Ubuntu</a></td></tr>
HTML:
<tr><td class="songbg"><a href="http://php.net">PHP</a></td></tr>
<tr><td><a href="http://zend.com">Zend</a></td></tr>
<tr><td class="songbg"><a href="http://dev.mysql.com">Mysql</a></td></tr>
<tr><td><a href="http://ubuntu.com">Ubuntu</a></td></tr>