Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can some one please tell me how do i change the content of td tag in PHP?

example, if
PHP
<td>Hello</td>
then i want to change it with php to something like
PHP
<td>Hello2</td>


or add something with that content like, if
PHP
<td>Hello</td>
then i want to keep same code but added some word like
PHP
<td>Hello world</td>
Posted
Comments
Peter Leow 23-Apr-14 23:43pm    
td is HTML tag that can be generated dynamically by PHP on server-side and be sent to the browser to display as HTML. Under what circumstances do you want to change it?
Member 10749093 23-Apr-14 23:51pm    
i know d is HTML tag but i want some how change it's content using php

for example if in td tag equals Hello then i want php to change it to Hello2

1 solution

Your question is really general.

Many Options

1. PHP Regex string
2. PHP HTML Parser
3. PHP Concat strings
4. HTML DOM Manipulation By Tag, ID, innerHTML
5...

etc, etc
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900