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:-) 

 

 

 

 

 

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.

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

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.