forked from Adleraci/adlerka.top
Test
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
function generateScriptData(array $phpArray):string {
|
||||
// Check if the array is associative and single-level
|
||||
if (is_array($phpArray) && count($phpArray) > 0 && count(array_filter(array_keys($phpArray), 'is_string')) === count($phpArray)) {
|
||||
if (count($phpArray) > 0 && count(array_filter(array_keys($phpArray), 'is_string')) === count($phpArray)) {
|
||||
// Generate JavaScript code to save each array element to local storage
|
||||
$out = "<script>";
|
||||
foreach ($phpArray as $key => $value) {
|
||||
|
Reference in New Issue
Block a user