Get current date and time with timezone in wordpress

+10 Get current date and time with timezone in wordpress <?php $timezone = wp_timezone_string(); //Get the timezone $today_date = get_date_from_gmt($timezone,date(“Y-m-d”)); $current_time = current_time( “H:i:s”, $gmt = 0 ); // Echo the variable and enjoy ?>  

How to detect You tube Channel / Playlist / Video ID in you tube account

+10 Step 1. First go to the  browser and  login with your google account Step 2.  And Open YouTube  Step 3. After open you tube please view at left side bar (Navigation Drawer) and click it for open and select here Setting Menu Step 4. Here you view Advanced settings and click it for open …

How to remove duplicate option from Select dropdown using JQuery

+30 How to remove duplicate option from Select dropdown using JQuery <!DOCTYPE html> <html lang=”en”> <head> <title>Codelizar – Remove duplicate options</title> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css”> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js”></script> <script src=”https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js”></script> </head> <body> <h1>Method 1</h1> <select id=”sel_box”> <option value=””>All Equipment</option> <option value=”1″>Dumbells</option> <option value=”2″>Plates</option> <option value=”3″>Rodes</option> <option value=”4″>Benches</option> </select> <h1>Method 2</h1> <select id=”sel_box_another”> <option value=””>All Equipment</option> <option value=”1″>Dumbells</option> …

How to run or execute multi query in mysqli PHP

+10 How to run or execute multi query in mysqli PHP $conn = mysqli_connect(“localhost”,”username”,”password”,”database_name”); /* Test Connection */ if (mysqli_connect_errno()) { printf(“Your Connection failed: %s\n”, mysqli_connect_error()); exit(); } $query = “DELETE FROM `demo_table` WHERE `mid`=’$id’;INSERT INTO `MyTable` (`firstname`, `lastname`, `emailid`) VALUES (‘Brain’, ‘Colls’, ‘brain@mail.com’)”; mysqli_multi_query($conn,$query); // Execute multi query at one time