php - Can I extract html from mysql table instead of plain text? -


i'm using code extract text database , works strips html tags.

$this->data['getshorty'] = utf8_substr(strip_tags(html_entity_decode($product_info['description'], ent_quotes, 'utf-8')), 0, 640); 

i rather able extract string html tags included , choose stop @ first or second paragraph break instead of counting 640 characters. do-able?

the function strip_tags() removes html. remove function line , should fine.

$this->data['getshorty'] = utf8_substr(html_entity_decode($product_info['description'], ent_quotes, 'utf-8'), 0, 640); 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -