Reputation: 37
I have got field in database with <p>intro content</p><p>rest of content....</p>
How to remove first paragraph of content <p>intro content</p>
using PHP?
Upvotes: 0
Views: 574
Reputation:
assuming mysql
SELECT SUBSTRING_INDEX(content_field, '</p>', 1) as cut from TABLE
replace in db:
update [table_name] set [field_name] = replace([field_name],SUBSTRING_INDEX([field_name], '</p>', 1),'');
Upvotes: 1