$previewcontent = substr($content,0,300); if(isset($go)) { //If set then they have seen the preview already echo $content; //Display your usual content } else { //First time viewing this page echo "Article preview:

" . $previewcontent; echo "See this entire posthere"; //Or you could add something like this (instead of lines 6 & 7) for paid/subscription content if(isset($user)) { //If a user is logged in... echo "Go ahead and view"; } else { //$user is not set - insert login/signup link/form below echo "To view this solution please click here to purchase access."; }