Article View: pl.comp.lang.php
Article #230588Re: array_fill
From: Kviat
Date: Sun, 02 Nov 2014 16:46
Date: Sun, 02 Nov 2014 16:46
27 lines
2112 bytes
2112 bytes
W dniu 2014-11-02 o 14:09, artiun pisze:
> W dniu 2014-11-02 o 08:29, Rafal Podsiadly pisze:
>> Po pierwsze PHP tworzy zmienne w momencie deklarowania
>> Po drugie php możemy tworzyć na kilka sposobów
>> Zalecam poczytać o tablicach asocjacyjnych
>> taka konstrukcja $array = array("foo", "bar", "hello", "world");
>> jest równoważna z tym
>>
>> $array[] = "foo";
>> $array[] = "bar";
>> $array[] = "hello";
>> $array[] = "world";
>>
>> wystarczy użyć var_dump i jeśli znajdziesz jakieś różnice no to
>> stawiam piwo.:) albo ta deklaracja nie działa w PHP.
>>
> Przecież napisałem, że nie ma deklaracji zmiennych. Po co więc powtarzasz?
Napisałeś:
"PHP (chyba,że coś się zmieniło) nie ma deklaracji, takie coś nie jest
możliwe: $tablica[] = 1;"
Jest możliwe.
Pozdrawiam
Piotr
Technical Details
Message-ID:
<54565fef$0$11135$65785112@news.neostrada.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mailReferences:
<lvff6c$2tj$1@node2.news.atman.pl> <541B4192.7060605@ila.nie.ma> <541b5f5e$0$2371$65785112@news.neostrada.pl> <lvgtlu$eot$1@node2.news.atman.pl> <lvhoab$p24$1@node1.news.atman.pl> <ebfcc7d2-fc05-4977-9134-f2e8f552468f@googlegroups.com> <54541b4f$0$18072$65785112@news.neostrada.pl> <96684a2a-1068-4c97-8fe9-0c181cbc0a9d@googlegroups.com> <54562d85$0$12645$65785112@news.neostrada.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail Date: Sun, 02 Nov 2014 17:46:48 +0100 From: Kviat <kviat@NIE_DLA_SPAMUneostrada.pl> User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 Newsgroups: pl.comp.lang.php Subject: Re: array_fill References: <lvff6c$2tj$1@node2.news.atman.pl> <541B4192.7060605@ila.nie.ma> <541b5f5e$0$2371$65785112@news.neostrada.pl> <lvgtlu$eot$1@node2.news.atman.pl> <lvhoab$p24$1@node1.news.atman.pl> <ebfcc7d2-fc05-4977-9134-f2e8f552468f@googlegroups.com> <54541b4f$0$18072$65785112@news.neostrada.pl> <96684a2a-1068-4c97-8fe9-0c181cbc0a9d@googlegroups.com> <54562d85$0$12645$65785112@news.neostrada.pl> In-Reply-To: <54562d85$0$12645$65785112@news.neostrada.pl> Lines: 28 Message-ID: <54565fef$0$11135$65785112@news.neostrada.pl> Organization: Telekomunikacja Polska NNTP-Posting-Host: 83.11.149.253 X-Trace: 1414946799 unt-rea-a-02.news.neostrada.pl 11135 83.11.149.253:16918 X-Complaints-To: abuse@news.neostrada.pl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit