Jump to content

Notice: Undefined Offset


FUNKAM35

Recommended Posts

Hi, I am getting a

: Undefined offset

 

with the following code

 

$words=str_word_count($desc);
if($words >25)
{
$offset = strpos ($desc, " " ,170);
$desc = substr ($desc,0,$offset);
$desc.= "......";
}


 

I only want to display a certain length of the desc which works but I get this error message, any ideas welcome

thanks Notice

Link to comment
https://forums.phpfreaks.com/topic/271205-notice-undefined-offset/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.