Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript] Nieprawidłowa składnia tablicy
Octobus
post
Post #1





Grupa: Zarejestrowani
Postów: 259
Pomógł: 1
Dołączył: 3.07.2011

Ostrzeżenie: (0%)
-----


Mam taką tablicę generowaną przez PHP:
Kod
var subcategories = [];
                            
var subcategories[8] = [];
var subcategories[8][28] = Apprenticeships;
            
var subcategories[8] = [];
var subcategories[8][29] = Counselling & Support;
            
var subcategories[8] = [];
var subcategories[8][30] = Disabled/Injured;

w 3 linijce wyswietla konsola blad: "SyntaxError: Unexpected token ["
Jak więc powinna wyglądać struktura takiej tablicy ?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.12.2025 - 22:03