Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##PHP Code
- //Divides String after amount of spaces between words + 1
- $arr = explode(" ",$contents,100+1);
- //Grabs the the end of the array value.
- $last = array_pop($arr);
- //Compile all the strings again into one.
- $contents = implode(" ",$arr)." ".'<a href="">Read More...</a></p><div class="content_more" style="display:none">'." ".$last."</div>";
- //Notice the open paragraph tag.
- <div class="rower2 rb">
- <p>
- $contents
- </div>
- //HTML Output
- <p>
- The start of the content post. More content here.
- <a href="">Read More...</a>
- </p>
- <div class="content_more" style="display:none">
- The rest of the contents.
- </div>
Advertisement
Add Comment
Please, Sign In to add comment