Re: [PHP] sticky checkbox - strpos

2012-02-08 Thread Marc Guay
>> if (!strpos($t_product,$t_p)) {print "checked";} It could have something to do with the function returning 0 because it's finding the comma in the 0 index, but it's not really false, it's still finding the string. I've run into a similar problem before... Marc -- PHP General Mailing List (h

Re: [PHP] sticky checkbox - strpos

2012-02-08 Thread Donovan Brooke
Donovan Brooke wrote: if (!strpos($t_product,$t_p)) {print "checked";} Nevermind.. bad syntax I guess.. this works: (strpos($t_product,$t_p) !== false) Donovan -- D Brooke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sticky checkbox - strpos

2012-02-08 Thread Donovan Brooke
Hi guys, if (!strpos($t_product,$t_p)) {print "checked";} Would strpos be munged if $t_p contains commas?.. ie ",234," Thanks, Donovan -- D Brooke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php