将字符串与Swift中的dataUsingEncoding(NSUTF8StringEncoding)进行比较

I was wondering why i can not compare a string that I pass through request.HTTPBody = post.String.dataUsingEncoding(NSUTF8StringEncoding) to the php server to a string of type variable. I pass a String through request.HTTPMethod = "POST" and I want to find out whether the passed string equals to a value, for example:

$item=$_POST[item]
if ($item == "Car') echo "Automobile";

The code doesn't work unless I change it to this(not double equal sign):

$item=$_POST[item]
if ($item = "Car') echo "Automobile";

Any help would be appreciated!