Problem with if statement that should return true
Posted: Wed Dec 26, 2007 12:39 pm
feyd | Please use
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.
Best Regards
Oskar R
feyd | Please use
Code: Select all
,Code: Select all
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:Code: Select all
$breadcrumbtrail = $breadcrumb->trail(' » ');
$breadcrumbexploded = explode(";", $breadcrumbtrail);
echo $breadcrumbexploded[0];
if ($breadcrumbexploded[0] == "&RAQUO") {
echo "true";
} else {
echo "false";
}Best Regards
Oskar R
feyd | Please use
Code: Select all
,Code: Select all
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]