Title: PhP Parse stgin from post
Last modified: August 21, 2016

---

# PhP Parse stgin from post

 *  Resolved [zzuum](https://wordpress.org/support/users/zzuum/)
 * (@zzuum)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/)
 * Hello,
 * i want to find all <h2> tags in my post and put it i one array…
 * (I need all sentence with h2 tags, from post)
 * Thank you.

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382442)
 * Maybe [http://stackoverflow.com/questions/15737408/php-find-all-occurrences-of-a-substring-in-a-string](http://stackoverflow.com/questions/15737408/php-find-all-occurrences-of-a-substring-in-a-string)
 *  Thread Starter [zzuum](https://wordpress.org/support/users/zzuum/)
 * (@zzuum)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382463)
 * Thank you for answer..but i need something more precision.. 🙂
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382477)
 * In the bigger picture do you think JavaScript is more suitable for what you’re
   doing?
 *  Thread Starter [zzuum](https://wordpress.org/support/users/zzuum/)
 * (@zzuum)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382493)
 * well maybe.. do you have some example with JavaScript..?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382510)
 * What is it you’re trying to do?
 *  Thread Starter [zzuum](https://wordpress.org/support/users/zzuum/)
 * (@zzuum)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382517)
 * I want use all sentences from post that have <h2> tag… and then print them..
 * example :
    new post
 * <h2>title1</h2>
    text1 <h2>title2</h2> text2 <h2>title3</h2> text3
 * and now i need that titles from post.
 * Here is picture : [http://i42.tinypic.com/so1n5e.png](http://i42.tinypic.com/so1n5e.png)
   
   That <h2> i want.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382526)
 * Print them in the same post?
 *  Thread Starter [zzuum](https://wordpress.org/support/users/zzuum/)
 * (@zzuum)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382530)
 * i need to print them here : [http://stefanvblog.com/category/top5/](http://stefanvblog.com/category/top5/)
 * but if you can’t that.. is ok in the same post too 🙂
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382536)
 * Is the title of the post is explicitly set in ‘`<h2>`‘ tags and not the actual
   post title outlined here: [http://snag.gy/oZJWP.jpg](http://snag.gy/oZJWP.jpg)?
 *  Thread Starter [zzuum](https://wordpress.org/support/users/zzuum/)
 * (@zzuum)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382540)
 * No, i don’t need title of post.. I need text in the post that has h3 tag
 * Here is image : [http://i42.tinypic.com/so1n5e.png](http://i42.tinypic.com/so1n5e.png)
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382546)
 * I think you’re going to need to convert your HTML string into a DOM object [http://stackoverflow.com/questions/5126967/extract-dom-elements-from-string-in-php](http://stackoverflow.com/questions/5126967/extract-dom-elements-from-string-in-php)
 *  Thread Starter [zzuum](https://wordpress.org/support/users/zzuum/)
 * (@zzuum)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382548)
 * woow.. all html .. :S .. is there any easier way

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘PhP Parse stgin from post’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [tag](https://wordpress.org/support/topic-tag/tag/)

 * 12 replies
 * 2 participants
 * Last reply from: [zzuum](https://wordpress.org/support/users/zzuum/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/php-parse-stgin-from-post/#post-4382548)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
