Jump to content

Warning: strpos() [function.strpos]: Offset not contained in string


willingtolearn

Recommended Posts

Hi, I'll be honest don't have a clue what I am doing but a friend asked me to look into her site, she gets the following error at the top of this page http://www.morairaluxuryvillas.com/rentals/villalist.php

 

Warning: strpos() [function.strpos]: Offset not contained in string in /home/morairal/public_html/rentals/villalist.php  on line 85

 

the code on the line 85 is:  $secondfstemp = strpos($block1, ".", $firstfs);

 

I am more than willing to look into but don't know where to start - anyone have any ideas?

 

Thanks for your time:-) 

 

 

 

 

 

Link to comment
Share on other sites

The message means that $firstfs (where strpos() is to begin looking for a period) is negative* or beyond the end of the string**.

 

We need to see more code. Especially the stuff that creates $firstfs and what's in between that code and the line you posted.

My guess is that $block1 is has one period at the very end and that the $firstfs code looks like

$firstfs = strpos($block1, ".") + 1;

While we're at it, how about some context? What does the code do? What is $block1?

 

* Maybe. Might have different message for that case. ** Technically, greater than or equal to.

Link to comment
Share on other sites

Hi thanks for the reply - i have attached the code, you were right with your guess,

 

I am trying to figure out what $block1 is...

 

It is a property site and she inserts the property details in through her admin section, this page lists all of the properties and pulls a brief description of every property listed down the page..

 

Thanks again for your help:-)

17728_.php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.