Link to home
Start Free TrialLog in
Avatar of Nikki_Dorens
Nikki_Dorens

asked on

Substituting row in TABLE

In a function the first row of a TABLE should be deleted and add another row after the last one. How can I do this just once after a command given in order to avoid a looping?
Avatar of thoellri
thoellri

And TABLE is what? An array? a hash? a string? a table in a database?
This seems waaaaay too simple.  I must not understand the question.  On the off chance it is this simple here's what I'd do:

$tablehasbeendeleted = 0;
while ($tablehasbeendelete == 0) {&arfarf;}

sub arfarf
{
&deletetable;
if ($successful {$indeletingtable}($tablehasbeendeleted = 1;)
}


or place an if statement at the beginning of arfarf.
Avatar of Nikki_Dorens

ASKER

I think I did not explain correctly what I need; the TABLE i meant is the HTML type.
In a table like:
<TABLE>
<TR>
<TD>cell1a</TD>
<TD>cell1b</TD>
<TD>cell1c</TD>
</TR>
<TR>
<TD>cell2a</TD>
<TD>cell2b</TD>
<TD>cell2c</TD>
</TR>
<TR>
<TD>cell3a</TD>
<TD>cell3b</TD>
<TD>cell3c</TD>
</TR>
</TABLE>
I need to delete from the first occurrence of <TR> to the first </TR> and add at the end, before </TABLE>:
<TR>
<TD>cell4a</TD>
<TD>cell4b</TD>
<TD>cell4c</TD>
</TR>
ASKER CERTIFIED SOLUTION
Avatar of jasoncolson
jasoncolson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial