Jump to content

Problem with if statement that should return true


oskare100

Recommended Posts

Hello,

This is the code snippet:

 

$breadcrumbtrail = $breadcrumb->trail(' » ');
$breadcrumbexploded = explode(";", $breadcrumbtrail);
echo $breadcrumbexploded[0];
if ($breadcrumbexploded[0] == "&RAQUO") {
echo "true";
} else {
echo "false";
}

 

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

 

 

   

What does this say?

 

<?php
$breadcrumbtrail = $breadcrumb->trail(' » ');
$breadcrumbexploded = explode(";", $breadcrumbtrail);
var_dump($breadcrumbexploded[0]);
if ($breadcrumbexploded[0] == "&RAQUO") {
echo "true";
} else {
echo "false";
}

 

PhREEEk

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.