mmarif4u Posted August 8, 2008 Share Posted August 8, 2008 Hi, i need some help in a calculation script. I am getting data from a sms, which i explode further. In every sms 9 values are coming,till to explode part everything is fine. Now i want to calculate that values. some thing like: <?php $x="1,2,3,4,4,5,6,7,8,9"; list($ch1_1,$ch2_1,$ch3_1,$ch1_2,$ch2_2,$ch3_2,$ch1_3,$ch2_3,$ch3_3) = explode(",",$x); echo $ch1_3."<br>"; echo $ch3_2; ?> Now i want to to do further calculations like: $ch1_1=a0+(a1*$ch1_11)+(a2*$ch1_12)+(a3*$ch1_13)+(a4*$ch1_14)..........; a0 and ...... are coming from table, it is also ok. Now how can i calculate: $ch1_11 and then $ch1_12 mean something like square root and cube root and so on... Link to comment https://forums.phpfreaks.com/topic/118728-solved-calculations/ Share on other sites More sharing options...
vikramjeet.singla Posted August 8, 2008 Share Posted August 8, 2008 use this: <?php var_dump(pow(2, ); // int(256) echo pow(-1, 20); // 1 echo pow(0, 0); // 1 echo pow(-1, 5.5); // PHP >4.0.6 NAN echo pow(-1, 5.5); // PHP <=4.0.6 1.#IND ?> Link to comment https://forums.phpfreaks.com/topic/118728-solved-calculations/#findComment-611294 Share on other sites More sharing options...
mmarif4u Posted August 8, 2008 Author Share Posted August 8, 2008 Thanks make, pow rocks. Link to comment https://forums.phpfreaks.com/topic/118728-solved-calculations/#findComment-611310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.