mercredi 22 juin 2016

How I can do this in right way?

I have 50 variables in php. I want to check each of them and if they true then add 2 points in a variable called $point. I am new so I write a few lines but I think I am doing wrong way.

$strenght_point = 0;

if($f_name){$strenght_point++;} 
if($l_name){$strenght_point + 2;}   
if($full_name){$strenght_point + 2;}    

How can I do it right way.Thanks

Aucun commentaire:

Enregistrer un commentaire