Skip to content

Instantly share code, notes, and snippets.

View radheymkumar's full-sized avatar

Radheshyam Kumawat radheymkumar

  • PTI WebTech
  • Jaipur
View GitHub Profile
@radheymkumar
radheymkumar / gist:c7043dc9e993bf55ed9261431f348a00
Created April 12, 2018 12:47
get even and odd value in array
print_r(array_filter($numbers, 'isPositive'));
function isPositive($val) {
//return ($val > 50) ? true : false;
if($val%2 == 1) {
return $val;
}
}
<?php
$server = "localhost";
$username = "xxxx";
$pasword = "xxxx";
$dbName = "xxxx";
$conn = new mysqli($server, $username, $pasword, $dbName);
if($conn->connect_error) {
die('Connection Error'. $conn->connect_error);
}
LANG_TRANSLATE = https://drupal.stackexchange.com/questions/249408/how-to-create-a-list-of-untranslated-content-in-views/249411#249411
/* Get Path */
$path = \Drupal::request()->getpathInfo();
$arg = explode('/',$path);
/*Get User info */
$current_user = \Drupal::currentUser();
/* http://drupal8.support/en/ontdek */