Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
Untitled Diff
बनाया गया
3 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
20 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
23 लाइनें
सभी को कॉपी करें
25 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
21 लाइनें
सभी को कॉपी करें
<?php
<?php
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
// Turn an array into a key=>value
pair.
Assumes the key is the first item in the sub-array.
// Turn an array into a key=>value
or key=>array
pair.
public function column
_i
nto
_k
eys(array $array): array {
//
Assumes the key is the first item in the sub-array.
public function column
I
nto
K
eys(array $array): array {
// get the name of the column that contains the record id
$key = key($array[0]);
// skip empty arrays
if (! count($array)) return [];
// loop through each result row
foreach($array as $row) {
foreach($array as $row) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
// pop the
new key
off the top of the array
// pop the
value of the row identifier
off the top of the array
$id = array_shift($row);
$id = array_shift($row);
// O(n)
//
is
there
only one item left in the array
?
//
if
there
is
only one item left in the array
...
if
(count($row) == 1)
$result[$id] =
(count($row) == 1)
//
get the first value
? current($row)
//
...
get the first value
$result[$id] = current(
$row
);
:
$row
;
//
...
get
the rest
of the
array
else
//
get
all
of the
values
$result[$id] = $row;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return $result;
return $result;
}
}
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
<?php // Turn an array into a key=>value pair. Assumes the key is the first item in the sub-array. public function column_into_keys(array $array): array { // get the name of the column that contains the record id $key = key($array[0]); foreach($array as $row) { // pop the new key off the top of the array $id = array_shift($row); // is there only one item left in the array? if (count($row) == 1) // get the first value $result[$id] = current($row); else // get all of the values $result[$id] = $row; } return $result; }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
<?php // Turn an array into a key=>value or key=>array pair. // Assumes the key is the first item in the sub-array. public function columnIntoKeys(array $array): array { // skip empty arrays if (! count($array)) return []; // loop through each result row foreach($array as $row) { // pop the value of the row identifier off the top of the array $id = array_shift($row); // O(n) // if there is only one item left in the array... $result[$id] = (count($row) == 1) ? current($row) // ...get the first value : $row; // ...get the rest of the array } return $result; }
अंतर खोजें