This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "Hello World to Mukesh Dak !!!"; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$analyze = ''; | |
$punctuations = '.:-,;–_?!'; | |
if (isset($_POST['analyze']) and trim($_POST['analyze']) != '') { | |
$analyze = $_POST['analyze']; | |
$analyzed = preg_replace( "/\r|\n/", " ", $analyze ); | |
$len = strlen($analyze); | |
$pl = strlen($punctuations); | |
for ($i=0; $i < $pl; $i++) { | |
$analyzed = str_replace($punctuations[$i], ' ', $analyzed); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Registration</title> | |
<style type="text/css" media="screen"> | |
.error { color: red; } | |
</style> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class pathfinder{ | |
private static $params = [ | |
'string'=>'a b c d e f g h i j', | |
'node_pair_counter_max'=> 10 | |
]; | |
private static $nodes_old; | |
public static $node_pairs; | |
public static $node_pairs_arrays; | |
public static $pathes_list; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wpajaxusersearch() | |
{ | |
global $wpdb; | |
$request = $_REQUEST; | |
$columns = array('u.user_email','um.meta_value','u.user_url','um.meta_value','um.meta_value'); | |
$all_users_id = $wpdb->get_results("SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY $sort ASC"); | |
$sort = "u.user_registered ASC"; | |
$search = $request['search']['value']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$number_of_groups = 5; /// Please change the number according to your number of sequence you require | |
$sum_to = 100; | |
$groups = array(); | |
$group = 0; | |
while(array_sum($groups) != $sum_to) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
class WidgetTest{ | |
static public $callbacks = array(); | |
public $text = 0; | |
public $text2 = 0; | |
public $counters; | |
function __construct() | |
{ | |
$this->counters = array_fill(0,100000,0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
class WidgetTest{ | |
static public $callbacks = array(); | |
public $text = 0; | |
public $text2 = 0; | |
public $counters; | |
function __construct() | |
{ | |
$this->counters = array_fill(0,100000,0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fruits = array('apple', 'mango', 'grape', 'orange'); | |
echo 'For Loop Example <br>'; | |
for($i = 0; $i< count($fruits); $i++){ | |
echo ('I am '.$fruits[$i].'.<br>'); | |
} | |
echo '<hr>'; | |
echo 'Foreach Loop Example <br>'; | |
foreach($fruits as $fruit){ | |
echo ('I am '.$fruit.'.<br>'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_str_rev($str) | |
{ | |
$reversed = ''; | |
$strArr = str_split($str); | |
for (end($strArr); key($strArr)!==null; prev($strArr)){ | |
$reversed .= current($strArr); | |
} | |
return $reversed; | |
} |