| | |
Repalce content in html??
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 296
Reputation:
Solved Threads: 11
Hi,This is my php file.
I want to replace
$$FullName$$ with Jon Rama
And $$FirstName$$ with Jon and $$Gender$$ with Male
And save or create to new file Jon_Rama.php
How to do this??
I want to replace
$$FullName$$ with Jon Rama
And $$FirstName$$ with Jon and $$Gender$$ with Male
And save or create to new file Jon_Rama.php
PHP Syntax (Toggle Plain Text)
<table width="100%"> <tr> <td align="center"> <b> <h1 class="title_list">$$FullName$$</h1> </b> <br><br> </td> </tr> <tr> <td>$$FirstName$$ is a $$Gender$$.</td> </tr> </table>
How to do this??
Try the following:
php Syntax (Toggle Plain Text)
$data='<table width="100%"> <tr> <td align="center"> <b> <h1 class="title_list">$$FullName$$</h1> </b> <br><br> </td> </tr> <tr> <td>$$FirstName$$ is a $$Gender$$.</td> </tr> </table>'; $data=str_replace(array('$$FirstName$$','$$Gender$$','$$FullName$$'),array('Bill','Male','Bill Gates'),$data); echo $data;
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - Oopy Doopy Do 2U2!
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - Oopy Doopy Do 2U2!
![]() |
Similar Threads
- Problems with iterating xml node-set containing html (XML, XSLT and XPATH)
- How to Display the whole content with HTML Formating (XML, XSLT and XPATH)
- How to fill the content with Ajax AFTER page fully loaded (JavaScript / DHTML / AJAX)
- BaseHTTPServer, sending binary content such as images (Python)
- News Story: HTML 5 drafted (Web Development Job Offers)
- HTML display but xml content (HTML and CSS)
- Protect Source Code But Maintain Content Functionality (Windows Software)
Other Threads in the PHP Forum
- Previous Thread: Row variable to live link
- Next Thread: Upload a Thumbnail of selected file
Views: 166 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array autosuggest beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email emptydisplayvalue error explodefunction file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla keywords limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search searchbox select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web website xml youtube






