Menu
Please take a look of the following code. While outputting the two string variables, I am getting the same sting with same amount of space. But while comaparing I am getting the output “Different” What kind of string operation I have to do so that I will get “Same”. Thank you.
[code=php]
<?php
$name1 = ” Hello World “);
$name2 = “Hello World”;
print “Before: $name1<br>”;
print “Before: $name2<br>”;
if ($name1 == $name2)
print “Same”;
else
print “Different”;
?>