-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
306 lines (294 loc) · 13.6 KB
/
index.php
File metadata and controls
306 lines (294 loc) · 13.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description"
content="Convert any list of data to array easily with ArrayCat. For example, a CSV file to JavaScript array without duplicate elements.">
<meta name="author" content="Macecraft Software">
<meta property="og:title" content="ArrayCat">
<meta property="og:description"
content="Convert a list of data to array easily with ArrayCat. For example, a CSV file to JavaScript array without duplicate elements.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://arraycat.com/">
<meta property="og:image" content="https://arraycat.com/assets/images/arraycat.png">
<title>Convert any string to array with ArrayCat</title>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="stylesheet" href="./assets/css/bootstrap.css">
<link rel="stylesheet" href="./assets/css/loading.css">
<link rel="stylesheet" href="./assets/css/style.css">
<script defer data-domain="arraycat.com" src="https://plausible.io/js/script.js"></script>
</head>
<body class="home-page">
<header>
<nav class="navbar navbar-expand-lg mx-auto py-0">
<div class="d-flex w-100 justify-content-between align-items-center">
<div class="d-flex align-items-center">
<div class="navbar-brand mr-2">
<img
width="120"
class="img-fluid"
src="assets/images/logo.svg"
alt="ArrayCat logo"
title="ArrayCat is seepy after converting so many lists to arrays">
</div>
<div class="">
<h1 class="mb-0">ArrayCat</h1>
<h2 class="mb-0">Convert any string to array</h2>
</div>
</div>
<div class="tumbler-wrapper">
<img
class="mode-toggle-icon"
src="./assets/images/toggle_sun.png"
alt="mode toggle"
>
</div>
</div>
</nav>
</header>
<main class="mx-auto mt-0 px-3 max-w-640">
<div>
<h3 style="font-size: 34px">Convert any strings to array with ArrayCat</h3>
<p class="mt-sm-5 pb-4">
ArrayCat is a free tool for converting a list of data or any string into an array. For example, you can convert a CSV file into
a PHP array. Or, into a JavaScript array. Or even into a SQL insertion, which is technically not an array,
but cats get confused sometimes.</p>
<p>Not only string to array conversions, ArrayCat also supports various transformations,
such as: sort lists, delete duplicates from lists, remove diacritics, convert data to lower case,
base64 encode elements, convert to HTML entities, and much more.
You can find the full list of supported transformations below.
</p>
</div>
<div class="input-box p-4">
<div
class="d-flex flex-column flex-md-row justify-content-between align-items-center"
>
<div class="d-flex align-items-center mb-3 mb-md-0">
<p class="my-0 mr-2 font-weight-bold">Input data format:</p>
<div class="selectBox dropdown">
<div
class="selectBox__value dropdown-toggle"
data-toggle="dropdown"
id="inputDataFormat"
>
One item per row
</div>
<div class="dropdown-menu">
<a href="javascript:void(0)" class="dropdown-item ">Comma separated</a>
<a href="javascript:void(0)" class="dropdown-item">Inside quotation marks</a>
<a href="javascript:void(0)" class="dropdown-item active">One item per row</a>
<a href="javascript:void(0)" class="dropdown-item">Tab separated</a>
</div>
</div>
</div>
<div class="d-flex">
<button class="default-btn mr-2" id="exampleBtn">Example</button>
<label class="default-btn" id="uploadBtn">
<input type="file" id="uploadfile">
Load file
</label>
</div>
</div>
<textarea
class="text-area w-100 mt-3"
name="inputData"
id="inputData"
rows="10"
spellcheck="false"
></textarea>
</div>
<div class="text-center my-5">
<button class="default-btn" id="convertBtn">Convert</button>
</div>
<div class="output-box p-4 mb-5">
<div
class="d-flex flex-column flex-md-row justify-content-between align-items-center"
>
<div class="d-flex align-items-center mb-3 mb-md-0">
<p class="my-0 mr-2 font-weight-bold">Output data format:</p>
<div class="selectBox dropdown">
<div
class="selectBox__value dropdown-toggle"
data-toggle="dropdown"
id="outputDataFormat">
One item per row
</div>
<div class="dropdown-menu">
<a href="javascript:void(0)" class="dropdown-item">Delphi array</a>
<a href="javascript:void(0)" class="dropdown-item">Go array</a>
<a href="javascript:void(0)" class="dropdown-item">JavaScript array</a>
<a href="javascript:void(0)" class="dropdown-item active">One item per row</a>
<a href="javascript:void(0)" class="dropdown-item">Pascal array</a>
<a href="javascript:void(0)" class="dropdown-item">PHP array</a>
<a href="javascript:void(0)" class="dropdown-item">Python array</a>
<a href="javascript:void(0)" class="dropdown-item">SQL insert</a>
</div>
</div>
</div>
<div class="d-flex">
<div class="dropdown mr-2" id="transformDropdown">
<button
type="button"
class="default-btn dropdown-toggle transform-toggle"
data-toggle="dropdown">
Transform
</button>
<div class="dropdown-menu px-3">
<div class="py-2">
<input type="checkbox" id="base64" name="base64">
<label class="mb-0" for="base64">Base64 encode elements</label>
</div>
<div class="py-2">
<input type="checkbox" id="countDuplicate" name="countDuplicate">
<label class="mb-0" for="countDuplicate">Count duplicate elements</label>
</div>
<div class="py-2">
<input type="checkbox" id="htmlEntities" name="htmlEntities">
<label class="mb-0" for="htmlEntities">Convert to HTML entities</label>
</div>
<div class="py-2">
<input type="checkbox" id="lowercase" name="lowercase">
<label class="mb-0" for="lowercase">Convert to lower case</label>
</div>
<div class="py-2">
<input type="checkbox" id="fixApostrophes" name="fixApostrophes">
<label class="mb-0" for="fixApostrophes">Fix apostrophes</label>
</div>
<div class="py-2">
<input type="checkbox" id="fixQuotes" name="fixQuotes">
<label class="mb-0" for="fixQuotes">Fix quotation marks</label>
</div>
<div class="py-2">
<input type="checkbox" id="normalize" name="normalize">
<label class="mb-0" for="normalize">Remove diacritics</label>
</div>
<div class="py-2">
<input type="checkbox" id="duplicates" name="duplicates">
<label class="mb-0" for="duplicates">Remove duplicate elements</label>
</div>
<div class="py-2">
<input type="checkbox" id="removeEmptyElement" name="removeEmptyElement" checked>
<label class="mb-0" for="removeEmptyElement">Remove empty elements</label>
</div>
<div class="py-2">
<input type="checkbox" id="removeTrailing" name="removeTrailing">
<label class="mb-0" for="removeTrailing">Remove trailing separators</label>
</div>
<div class="py-2">
<input type="checkbox" id="sort" name="sort">
<label class="mb-0" for="sort">Sort elements</label>
</div>
<div class="py-2">
<input type="checkbox" id="stripWhitespace" name="stripWhitespace">
<label class="mb-0" for="stripWhitespace">Strip excess whitespace</label>
</div>
<div class="py-2">
<input type="checkbox" id="unifyWhitespace" name="unifyWhitespace">
<label class="mb-0" for="unifyWhitespace">Unify whitespace</label>
</div>
<div class="py-2">
<input type="checkbox" id="whitespace" name="whitespace" checked>
<label class="mb-0" for="whitespace">Trim whitespace</label>
</div>
<div id="maxrowwidthbox">
<label for="maxRowWidth">Maximum row length:</label>
<input
type="number"
id="maxRowWidth"
value="512"
min="1"
name="maxRowWidth"
>
</div>
</div>
</div>
<button class="default-btn" id="copyBtn">
Copy<span class="d-none d-sm-inline"> to clipboard</span>
</button>
</div>
</div>
<div class="mt-3 w-100 bg-white br-12 overflowx-auto output-box-inner">
<textarea
class="text-area"
name="outputData"
id="outputData"
spellcheck="false"
readonly
></textarea>
</div>
</div>
<div class="loading-element-mask">
<div class="loading-element">
<div class="inner one"></div>
<div class="inner two"></div>
<div class="inner three"></div>
</div>
</div>
</main>
<footer class="px-3">
<div>
<p><b>The following transformations are supported:</b></p>
<ul>
<li>Base64 encode each element.</li>
<li>Count duplicate elements.</li>
<li>Convert to HTML elements. This option will convert all applicable characters to HTML entities. For example,
"Durian > Jackfruit" becomes "Durian &gt; Jackfruit".
</li>
<li>Convert each element to lower case.</li>
<li>Fix apostrophes. This option will replace commonly used wrong apostrophe characters with the correct apostrophe character. For example,
"Jack's Durian" becomes "Jack’s Durian".
</li>
<li>Remove diacritics. This option will attempt to remove any diacritics and accent characters. For example,
converting "Crème Brulée" into "Creme Brulee", which is equally yummy but possibly easier to process.
</li>
<li>Remove duplicate elements. Removes all duplicate elements, after other transformers have been run
first. For example, if your list contains "John" and "john" and you have the <i>Convert each element to lower
case</i> enabled, only "john" will be added to the final output.
</li>
<li>Remove empty elements.</li>
<li>Sort elements. If enabled, the final output will be in alphabetical order.</li>
<li>Strip excess whitespace. Removes any cases of multiple spaces between words.</li>
<li>Unify whitespace. Replaces all whitespace characters with a single space.</li>
<li>Trim whitespace. Removes any leading and trailing space characters of each element.</li>
</ul>
<h2 class="mt-5">Convert any string to array with ArrayCat</h2>
<p>ArrayCat can <strong>convert any string to PHP array</strong>,
and it can also <strong>convert any string to JavaScript array</strong>, SQL insertion, and more. Or,
if you only need to remove duplicate elements from a list, you can use the <strong>Remove duplicates from array</strong> feature.
</p>
<h2 class="mt-5">Convert CSV to array format easily</h2>
<p>Need to convert CSV data into arrays? ArrayCat makes it simple to <strong>convert CSV to PHP array</strong> or
<strong>convert CSV to JavaScript array</strong>. Just paste your CSV data and choose your desired output format.</p>
<h2 class="mt-5">Delete duplicates from list</h2>
<p>Beyond basic conversions, ArrayCat helps you <strong>delete duplicates from lists</strong> and
<strong>remove duplicates from arrays</strong>. Make your data clean with just a few clicks.</p>
<h2 class="mt-5">Convert lists to multiple array formats</h2>
<p>Whether you need to <strong>convert text to array in PHP</strong>, <strong>create JavaScript arrays from text</strong>,
or generate SQL statements, ArrayCat is a cat who wants to match all your needs.</p>
<p class="mt-5 small">
<b>Privacy Policy:</b> Cats mind their own business. Data processing happens only inside
your browser, no data is sent to anywhere.<br><br>
<b>Terms of Service:</b> This service is provided to you "as is" without any guarantees of any kind. If you wish
to use this service, you will do so entirely at your own risk. For any feedback, please send an email: <a
href="mailto:jouni@arraycat.com">jouni@arraycat.com</a>
</p>
<p class="text-center mt-5 small">
Copyright 2023-<?php echo date('Y'); ?> <a href="https://greatsoftwarecompany.com" target="_blank">Great Software Company</a><br>
All Rights Reserved<br>
<a href="https://github.com/Great-Software-Company/array_cat" target="_blank">View on GitHub</a>
</p>
</div>
</footer>
<div class="copy-notification"></div>
<script src="./assets/js/cookie.js"></script>
<script src="./assets/js/darkmode.js"></script>
<script src="./assets/js/jquery.min.js"></script>
<script src="./assets/js/bootstrap.js"></script>
<script src="./assets/js/alert.js"></script>
<script src="./assets/js/script.js"></script>
</body>
</html>