Category : function

I have a function in PHP 7 and calling it but its not retrieving data, can someone help me please. function get_option($sql,$select) { global $con; $rr=mysqli_query($con,$sql); $option=”; while($dd=mysqli_fetch_array($rr)) { $sel=”; if ($select==$dd[0]) $sel="selected=’selected’"; $option.="<option value=’".$dd[0]."’ ".$sel.">".$dd[1]."</option>"; } return $option; } Select box is not displaying any data <select class="long form-control" name="typedebien" id="typedebien"> <option value="null">Choisir dans ..

Read more

I’m using ergast plugin for my wordpress website. The plugin don’t have codes for drivers and constructor standings. I’m trying to set not included code but front end don’t solve it. This is the url from ergast: https://ergast.com/api/f1/2021/22/constructorStandings.json Code for php from plugin: case ‘constructor_standings’: if(!isset($atts[‘season’])) { $url = ‘http://ergast.com/api/f1/current/constructorStandings.json’; } elseif(!isset($atts[’round’])) { $url = ..

Read more

I am looking for a proper way to extract all the array of objects thru simple loop. let scores= { ballet: { monica: ["comments1","91"], yael: ["comments2","79"], }, swimming: { gabay: ["comments3","82"], victor: ["comments3","95"], }, guitar: { gangina: ["comments4","97"], diko: ["comments5","42"], } }; …as a side note since the real database is huge so performace is ..

Read more

I am trying to use optional parameter in CodeIgniter. My controller function is like below. public function expenses($head = null, $date_to= null, $date_from =null) { $query_expenses = $this->user_model->get_all_expenses($head,$date_to,$date_from); //more code } My Model code is like below public function get_all_expenses($head = null, $date_to= null, $date_from =null) { $array = array(‘cat_id ==’ => $head, ‘date >’ ..

Read more