Telugu-English HTML Table with Link

Modified t2e_view.php to show an HTML table with telugu and english columns. The english column data appears as a link with the href being set to the value of english_audio_path column.

The page display is as shown below [To reduce eye strain I have a grey window background – need to change it when I want to take screenshots – will do that next time around hopefully :-)].

HTML table output

And here is the updated t2e_view.php source code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>t2e</title>
</head>

<body>

<?php $this->load->helper('form'); ?>
<?php
echo "<br><table border='1'>
<tr>
<th>Telugu </th>
<th>English </th>
</tr>";
?>
<?php echo form_open('t2e'); ?>
<?php if (isset($t2e)): foreach ($t2e as $p): ?>
<?php
echo "<tr>";
?>
<?php echo "<td>" . $p['telugu'] . "</td>"; ?>

<?php echo "<td>" . "<a href=\"" . $p['english_audio_path'] . "\">" .  $p['english'] . "</a></td>"; ?>
<?php
echo "</tr>";
?>

<?php endforeach; else: ?>

<h2>No data found</h2>

<?php endif; ?>
<?php
echo "</table>";
?>
<?php echo form_close(); ?>
</body>
</html>
Advertisements
This entry was posted in Spoken English App. Blog. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s