vendredi 13 mars 2015

Subtract and devide math using php oop


Vote count:

0




I'm learning php oop now. I was trying to do something like this.



$firstnumber=100;
$secoendnumber=30;
$difference=$firstnumber-$secoendnumber;
$changePercent=($difference*100)/$secoendnumber;


For me if I write it in procedural it is very easy. But I can't figure out how to do the same using oop. So, I don't have to Subtract and divide again and again if require.


Thanks.



asked 1 min ago







Subtract and devide math using php oop

Aucun commentaire:

Enregistrer un commentaire