Page 1 of 1

PHP - Get a cell value from an html table

Posted: Wed Jun 08, 2005 1:49 pm
by admiralwonka
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'>&nbsp; $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

Posted: Thu Jun 09, 2005 7:53 am
by anjanesh
After execution of the script Javascript is your only choice - before execution you still can get the value of $destCity right ?

Posted: Thu Jun 09, 2005 10:05 am
by pickle

Code: Select all

if($counter === '0')
{
 $value_wanted_to_store_forever = $destCity;
}