mercredi 30 novembre 2016

Compare 2 strings even if capital letters are included

I have a question about an if statement.

if($_POST['billing_first_name'] == $tet['data']['0']['first_name']) {
} 
else 
{   
} 

This code compares a string that it gets from a form with an already existing string.

It works. But when i dont add a capital letter, it runs the code after all.

So for example if i compare String with String it doesnt run the code (which is what i want) But when i compare string with String it runs the code (which i dont want) Only because theres no capital letter included at the beginning. Is there a way to fix this?

Aucun commentaire:

Enregistrer un commentaire