Master_MTA Posted April 9, 2019 Share Posted April 9, 2019 (edited) function delete_values_from_array($arr,$to){ $res=array(); for($k=0;$k<count($arr);$k++){ if ($k>$to){ array_push($res,$arr[$k]); } } return $res; } function mysqli_execute_all(){ $args = func_get_args(); if (func_num_args()<2){ return false;} $stmt = $args[0]->prepare($args[1]); $finalarr=delete_values_from_array($args,2); $stmt->bind_param($args[2],extract($finalarr)); $stmt->execute(); $result = $stmt->get_result(); return $result; } treat mysql injection +_+ بالتوفيق Edited April 9, 2019 by Master_MTA 2 Link to comment
#Mr.Pop Posted May 23, 2019 Share Posted May 23, 2019 $n = 0; function calc(int $x ,$o, int $y){ switch ($o) { case "+": $n = $x + $y ; break; case "-": $n = $x - $y ; break; case "*": $n = $x * $y ; break; case "/": $n = $x / $y ; break; default: $n = "SENTEX ERROR!" ; } return $n ; } echo " = ". calc(1,"+",3) ; SIMPLE CALC FUNCTION 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now