Does anyone know if there is a way to get a value from a cell in an html table? I have seen multiple solutions for this in javascript, but I really need it in PHP.
I am dynamically generating a table on my page:
PHP code:
<TD ALIGN=LEFT ID='destCityRow[$counter]' CLASS='SmallText'> $destCity</TD>
HTML result:
<TD ALIGN=LEFT ID='destCityRow[0]' CLASS='SmallText'>Duluth</TD>
How can I retrieve the value from this cell (in this case the value is "Duluth") and put it in a PHP variable?
Any help would be appreciated!
Thanks
PHP - Get a cell value from an html table
Moderator: General Moderators
-
admiralwonka
- Forum Newbie
- Posts: 1
- Joined: Wed Jun 08, 2005 1:39 pm
Code: Select all
if($counter === '0')
{
$value_wanted_to_store_forever = $destCity;
}Real programmers don't comment their code. If it was hard to write, it should be hard to understand.