Sub String

<?php $description=$blogdetails->description;
$pos = strpos($description, “</p>”);
echo  $string = substr($description,0, $pos+4);
?>

<h6><img src=”admin/<?php echo $blogdetails->image;?>” alt=”<?php echo $blogdetails->title;?>” /></h6>
<?php echo $shortdes = substr($description, $pos+4);?>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s