Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p>
- This message
- <span class="class1" title="title1" style="backgorund-color: #ffeea1; color: red; border: 1px solid green;">
- is abs. awsome
- </span>.
- </p>
- <p class="class2">
- Hello world
- </p>
- $tags = array(
- 'p' => array(
- '0' => array(
- 'text' => 'This message',
- 'content' => array(
- 'span' => array(
- '0' => array(
- 'text' => 'is abs. awsome',
- 'attributes' => array(
- 'class' => 'class1',
- 'title' => 'title1'
- ),
- 'styles' => array(
- 'background-color' => '#ffeea1',
- 'color' => 'red',
- 'border' => '1px solid green',
- )
- )
- )
- )
- ),
- '1' => array(
- 'text' => 'Hello world',
- 'attributes' => array(
- 'class' => 'class2'
- )
- )
- )
- );
- function processHTML($html) {
- // some regex processing
- // return $associative_array_with_tags_attributes_and_texts
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement