Title: Using strpos() right
Last modified: July 25, 2018

---

# Using strpos() right

 *  [tiggerswelt](https://wordpress.org/support/users/tiggerswelt/)
 * (@tiggerswelt)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/using-strpos-right/)
 * One of our customers experienced issues with this plugin whenever the [category_id
   =]-marker is placed directly at the beginning of the content.
 * We have tracked this down to an invalid usage of strpos(): strpos() will return
   zero (“0”) if the marker is directly at the beginning of the content, which evaluates
   to false if compared as equal to a boolean. Comparing as identical will solve
   the problem.
 * Please see <[http://php.net/manual/en/function.strpos.php&gt](http://php.net/manual/en/function.strpos.php&gt);
   for reference.

The topic ‘Using strpos() right’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/single-categories.svg)
 * [Single Categories](https://wordpress.org/plugins/single-categories/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/single-categories/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/single-categories/)
 * [Active Topics](https://wordpress.org/support/plugin/single-categories/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/single-categories/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/single-categories/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [tiggerswelt](https://wordpress.org/support/users/tiggerswelt/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/using-strpos-right/)
 * Status: not resolved