Jump to content
gsc1ugs

why is strcmp not working?

Recommended Posts

I cant understand why this is not working.. I compare two strings, if they match then do something.. I'm getting values 1 for the first and 8 for the second??

carquest-clearvape

carquest-carquest

 

 

					if (strcmp($_SESSION['username'],$username)==0)
						echo $this->amount($offer['amount'], $listing['currency']); 
					else
						echo $this->amount("*****", $listing['currency']); 	

 

Share this post


Link to post
Share on other sites

If you print both values that you're comparing I'm sure you'll see why it's doing whatever it is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×