ShivaGupta Posted January 12, 2014 Share Posted January 12, 2014 i am working with this code . <?php $str = ' 1 + 1+ 1 '; $str = str_replace(' ', '', $str); preg_match('/(?P<one>\d+)[+-](?P<two>\d+)[+-](?P<three>\d+)/', $str, $matches); $user = $matches[0]; ?> then here i want result as 3 plz help me how to do Link to comment https://forums.phpfreaks.com/topic/285301-plz-help-with-operators/ Share on other sites More sharing options...
Ch0cu3r Posted January 12, 2014 Share Posted January 12, 2014 Have a read of this thread http://forums.phpfreaks.com/topic/283274-simple-math-problem/ You should be able to find a solution within there. Link to comment https://forums.phpfreaks.com/topic/285301-plz-help-with-operators/#findComment-1464917 Share on other sites More sharing options...
ShivaGupta Posted January 12, 2014 Author Share Posted January 12, 2014 Have a read of this thread http://forums.phpfreaks.com/topic/283274-simple-math-problem/ You should be able to find a solution within there. after read that threed steel i have provlem.......... i am using a temp soltuion first save as php then include that php $sym1 = "$"; $sym2 = "user"; $sym3 = "<?php $sym1$sym2 = ( $user ); ?>"; $st='user.php'; file_put_contents($st, $sym3); include("user.php"); and it working fine but i want other soltuion ........... Link to comment https://forums.phpfreaks.com/topic/285301-plz-help-with-operators/#findComment-1464919 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.