string - Problem with Strpos In PHP -


I am writing a simple function and for some reason (maybe a simple one) it is not working for me and I was thinking that you guys could help me out if

  function check_value ($ postid) {$ id = $ postid $ Cookie = $ _COOKIE ['list_of_IDS']; $ Position = strokes ($ cookie, $ id); Resonance 'ID:' $ Id '- cookie:'. $ Cookie; If ($ position! == incorrect) {Resonance "ID is in cookie"; }}  

To figure out what problem I was putting in that there was then the above statement resonance line in trying to make sure that there is actually stuff in the variable.

My problem is that if IF statements never print.

A $ postID is a number 123123 .

$ cookie string is usually something like 123123.23422.234234.2342342.234234

thanks for your help!

The stroke will not work with an int, so you have to put the id in the string. Try this:

  $ id = (string) $ postid;  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -