PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello,
This is the code snippet:
That code returns the text "&RAQUOfalse" but it should return "&RAQUOtrue" since $breadcrumbexploded[0] == "&RAQUO". I can't figure out why it can't understand that $breadcrumbexploded[0] actuallt is &RAQUO.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
"&RAQUO" is not the same as "»", you will have to convert the string to either lowercase or uppercase before comparing (strtoupper()/strtolower()) or compare case-insensitive with strcasecmp().
Edit: Three replies, that's what you get for replying without refreshing the page first :p
Last edited by vigge89 on Wed Dec 26, 2007 12:55 pm, edited 1 time in total.
vigge89 wrote:"&RAQUO" is not the same as "»", you will have to convert the string to either lowercase or uppercase before comparing (strtoupper()/strtolower()).
vigge89 wrote:"&RAQUO" is not the same as "»", you will have to convert the string to either lowercase or uppercase before comparing (strtoupper()/strtolower()).
You so took my idea!
I want a court to settle this.
Heh, I win since you wrote $RAQUO instead of &RAQUO
vigge89 wrote:"&RAQUO" is not the same as "»", you will have to convert the string to either lowercase or uppercase before comparing (strtoupper()/strtolower()).
You so took my idea!
I want a court to settle this.
Heh, I win since you wrote $RAQUO instead of &RAQUO