Jump to content

Recommended Posts

How can I remove the "Column2" from the table?

So that:

<table>
<tr><th>Date
<th width='13%'>Column1
<th width='13%'>Column2
<th width='13%'>Column3
</tr>
<tr><td>06/20 Fri</td><td >0</td>
<td >0</td>
<td >0</td>

</tr>
<tr><td>06/21 Sat</td><td >0</td>
<td >0</td>
<td >0</td>

</tr>
</table>

 

will be converted into this:

 

<table>
<tr><th>Date
<th width='13%'>Column1
<th width='13%'>Column3
</tr>
<tr><td>06/20 Fri</td><td >0</td>
<td >0</td>

</tr>
<tr><td>06/21 Sat</td><td >0</td>
<td >0</td>

</tr>
</table>

 

thanks.

Link to comment
https://forums.phpfreaks.com/topic/163006-remove-second-column-from-a-table/
Share on other sites

How can I remove the "Column2" from the table?

Given your input I'd say open a text editor and remove the column but that's probably not what you mean.

 

specify your problem a bit more such as:

  • How do you wish to remove the column.
  • When do you want to remove this column
  • Where is this html table
  • etc

the more detail the easier someone can help

What I mean is that I have the html like this:

<?php

$table="<table>
<tr><th>Date
   <th width='13%'>Column1
   <th width='13%'>Column2
   <th width='13%'>Column3
</tr>
<tr><td>06/20 Fri</td><td >0</td>
<td >0</td>
<td >0</td>

</tr>
<tr><td>06/21 Sat</td><td >0</td>
<td >0</td>
<td >0</td>

</tr>
</table>";

// here some regular expression or something
?>

 

I just don't have any clue on how to do this.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.