![]() |
Strange string comparison problem
I'm making some changes to my site, which is based on vbulletin and some things I made had to be fixed after upgrading vbulletin. I use categories to display some content using an url like this:
So to get the content I need to get the ID associated with that category, it seems simple but when I check if the category exists I run into a problem. I do this by checking if the entered category name is the same as one of the categories from the existing array of categories. Both strings seem to be the same but the length is different.. Here's some var_dump() from the code: I've tried various things to "fix" the length of the string using trim() and strlen() but that didn't work.. When I use strlen() to shorten the longer string, nothing remains of it.. here's the code and var_dump: PHP Code:
Code:
string(11) "compositing" string(52) "compositing" int(11) int(52) bool(false) string(52) "compositing" string(11) " |
| All times are GMT. The time now is 09:18 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0