Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How to preg_replace elements with IDs
Old 07-27-2010, 09:57 PM How to preg_replace elements with IDs
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
Ok, kind of a misleading title, but I really don't know how to phrase it. My question is legit, though.

Basically, how would I preg_replace everything on the page?

Let's say I have a bunch of spans. If there is a URL parameter '?edit=true', then turn all of those spans into inputs. But only the spans with the id='editable'. Is that possible with PHP?

Thanks

-PG
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-28-2010, 12:30 AM Re: How to preg_replace elements with IDs
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
Are you trying inline editing? If yes, try searching "jquery inline edit"

www.appelsiini.net/projects/jeditable
http://papermashup.com/jquery-and-php-inline-editing/
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 07-28-2010, 08:39 AM Re: How to preg_replace elements with IDs
Super Talker

Posts: 139
Name: John Davis
Trades: 0
You may to use http://php.net/ob_start and http://php.net/ob_get_clean

Those functions help you to get parsed content, then you may to replace any page part as you wish.
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Reply     « Reply to How to preg_replace elements with IDs
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.79439 seconds with 12 queries