Sponsored by Travelzoo
All-time Low Fares for Thanksgiving, Christmas & New Year view!
travelzoo.com - Flights $52 and up. Nifty all-airline calendar identifies absolute cheapest dates to fly.
49 Comments
- emehrkay, on 10/12/2007, -1/+27all that and no mention of just $arr[] = 'foo' ?
- tadorna, on 10/12/2007, -0/+18Thats not ripped. It's one of the official drupal themes, released as open source by mozilla.
- Aaryn015, on 10/12/2007, -1/+11Your sense of humour? Someone's bound to find it one day......
- Negligence, on 10/12/2007, -0/+7"Who builds arrays with Array("val1", "val2", "val3") anyway?"
People who don't want fifteen separate lines of code just to initialize elements in an array. - mjar81, on 10/12/2007, -5/+12*****
- unununium, on 10/12/2007, -1/+8Not everyone is a master VB programmer with a 6 month DeVry education like you.
- bholub, on 10/12/2007, -0/+6"different"
4 times in 1 sentence? - auxide, on 10/12/2007, -0/+6PHP's manual is basicly like a tutorial, just a far more detailed one!
http://php.net/manual/en/language.types.array.php - f00xx0riz3r, on 10/12/2007, -5/+11Tomorrow: strings and what their usage is. Find out how to store "RETARDED" in your servers memory space!!
- bluephoenix, on 10/12/2007, -0/+5I think it would make more sense to explain arrays in a OOP related way, since arrays are pretty consistent throughout most languages. or...just go to php.net
- coditza, on 10/12/2007, -1/+6This is far away from "detailed".
- matthewconnelly, on 10/12/2007, -5/+9www.google.com
- inactive, on 10/12/2007, -4/+8@drakethegreat, you're just an elitist ass, different people learn different ways and more tutorials are a good thing.
The gotchas of modifying the array structure in a foreach loop were left out, but because it is aimed at a beginner I can understand why. - crilen007, on 10/12/2007, -5/+9Read.
- lqqkout4elfy, on 10/12/2007, -1/+5Why would there be a Digg article about the most basic thing about a simple language like PHP?????
Buried as LAME - inactive, on 10/12/2007, -0/+3Wow look I found a guide that doesn't look like a blog site and is accurate!! You can digg me down right away.
http://php.net/manual/en/ref.array.php - f00xx0riz3r, on 10/12/2007, -1/+4Pizzas are round. Thats a complicated shape in many aspects. I would suggest something easier such as a car wash (maximum two buttons) or perhaps street sweeping.
- Palmetto, on 10/12/2007, -0/+3Wow, I was just hoping for a book, website or the like to help.
Amazing that I received such negative responses.
@se7en11
Thanks for the info.. I have searched google.. I am beginning to understand better what is going on and am working on understanding the installation of PHPadmin and how it works. I am hosted with 1&1. Their website says that they support php and mysql but that I need to work with linux. I suppose I will
do that then.
I will also go to the website you suggested and post. Thanks for all your help.
@Crilen007
You are an *****. - se7en11, on 10/12/2007, -2/+4@palmetto - if you've already got a site and a company with PHP & MySQL hosting your site, hop on over to http://www.linein.org/blog/ and post a comment with your email address. I'd be more than happy to help. Both are really easy to setup and get started.
What crilen007 was saying is do some research on Google. There are tons of excellent tutorials on how to set up both. - fuzzybad, on 10/12/2007, -1/+3The array documentation on php.net is much more complete.
http://us2.php.net/manual/en/ref.array.php - PrisonerOfPain, on 10/12/2007, -0/+2Nor does it have an explanation on references, which in combination with arrays, tend to be a bitch to get right.
- yahoofrom, on 10/12/2007, -0/+2I can't see your joke.
- rdivilbiss, on 10/12/2007, -1/+3Very elementary with poor grammar. I agree with most here, just head over to PHP.NET
- gizmola, on 10/12/2007, -1/+3Next up in the series, an in depth evaluation of 'echo'.
I have seen discussions of seemingly trivial language constructs that actually do illuminate a subject, but this was not one of them. For one thing, the author is flat out wrong when stating that there are 3 different types of arrays. There is one type of array in php, period. Anyone who has for example, used the basic mysql client function mysql_fetch_array() knows this.
It also bothered me, that the first thing presented was the declaration of string constants using double quotes rather than single ones. Right away that tells me this is not an experienced php developer. I also agree with the first comment. One of the nicest features of php arrays is that they're dynamic. And yet, no discussion of the syntax. There's also a plethora of array functions, and rather than cover any of the interesting ones, this focuses on print_r, which is really just a debugging utility.
In summary, the writing was clearly by an ESL speaker, as evidenced by the lack of clarity and numerous spelling mistakes. This article not only isn't newsworthy or digg worthy, as an experienced PHP developer I couldn't recommend it to a rank beginner. There are so many better resources out there, and in this case, reading the array chapter in the PHP manual would be a much better introduction, even for a rank beginner, than this was. I honestly am scratching my head as to how this got so many diggs. The only thing I can think is that PHP fans just saw "PHP and Arrays" and clicked thumbs up. While I am a huge PHP supporter, Digging an article like this is actually counterproductive. - rdivilbiss, on 10/12/2007, -0/+2@phparion,
I read the whole article and have been programming for in excess of 30 years. Judging be the quotes from the article in many of the above critiques, it is obvious that most of the people critical of the article also read the entire article and are giving fair and even handed analysis.
I don't see anyone criticizing the concept or value of sites like howtoforge.com. The article is very weak, inaccurate in places and written poorly. It is not as good as the basic documentation provided at PHP.NET and therefore people are correct in their criticisms. Would it be better that these people lie and say it is good when it is not?
There is plenty of FREE knowledge available already. Some much better than this article as people pointed out. What we do not need is more FREE knowledge that is not up to par.
Better to think ten times before posting the article and getting an editor to proof read it than to expect programmers to think ten times before making positive or negative criticism on Digg. - tybris, on 10/12/2007, -0/+2Oh boy, arrays! How exciting.
- sirsteveh, on 10/12/2007, -0/+1Seriously, I'm getting tired of reading ***** like this on all sorts of basic, *basic* tutorials. If I want to learn how to code /(Ruby|Python|PHP|Perl|C#|Java)/, I'll go look for a ($1) site on Google.
- gizmola, on 10/12/2007, -0/+1Here's one meaningless quote for another:
"It also bothered me, that the first thing presented was the declaration of string constants using double quotes rather than single ones." doesn't make you sound like guru either."
Any string in php with double quotes is subject to interpolation. Hence my use of the very specific term "string constant". The author didn't present a single case where he needed interpolation -- only string constants. This raises the question --- does he know the difference? I didn't say it wouldn't work, I stated that it indicated that the author wasn't experienced.
As for trying to look or sound like a guru, I could care less about that, and even less what your opinion of my relative intellectual capacity is, especially after you admitted that interpolation introduces the overhead both of scanning a string for dollar signs, and for symbol table lookups. I also noticed you didn't have much to say about all the other points I brought up, because we both know I'm right. That however didn't stop you from typing in your little flame post despite the fact it wasn't in any way pertinent to either the subject or my comment.
You rock! - sroberson, on 10/12/2007, -5/+6Yeah, strange. Should have been right up there near the top. Who builds arrays with Array("val1", "val2", "val3") anyway?
It seems that these days all of my arrays are coming either from POST/GET params or from database recordsets.
I love me some associative arrays!
:^) - PrisonerOfPain, on 10/12/2007, -0/+1Posting stuff like "It also bothered me, that the first thing presented was the declaration of string constants using double quotes rather than single ones." doesn't make you sound like guru either. The only way double quotes present a "problem" is with a non escaped dollar sign followed by [a-zA-Z][a-zA-Z0-9_]* because it has to look the variable up in a table. That _might_ seem like an awful thing, but it's not, it's still fast. And it _by no means_ makes you look "smart" when using single quotes. It's just a matter of preference.
So could be, please, stop posting stupid things that seemingly make you look intelligent while they do not?
Thanks. - KiltedMile, on 10/12/2007, -0/+1That site... the colors... they look so similar to another site I know of...
- crilen007, on 10/12/2007, -2/+3No, I was saying get off your lazy ***** ass and find them for yourself.
But you can go your way if it makes you feel better. - jalenack, on 10/12/2007, -0/+1Well, I don't think foreach ($array as &$item) {} is that hard to explain.
They didn't mention foreach ($array as $key => $value) {} either. If this were truly a "detailed" guide, there would at least be some mention... - redmond007, on 10/12/2007, -0/+1Why is this news? arrays is pretty basic.
The great majority of digg users
a. already know about arrays
or b. don't use php - coditza, on 10/12/2007, -0/+1This is not news, but as someone pointed me a while back, digg isn't about news only, it's about interesting stuff.
- inactive, on 10/12/2007, -1/+1Simple language, yet ppl still code like ***** with it.
- cruxop, on 10/12/2007, -0/+0It's basic, but not all together useless. If you're a complete beginner, and this is the first site you find then at least it'll give you all the information you need to start using arrays.
It's not polished, but I wouldn't dig it down. - PAJK, on 10/12/2007, -2/+1The article was nice. It wasn't excellent, or great, but it was fine - good for beginners.
- jgtg32a, on 10/12/2007, -2/+1@auxide
Ya know it would have been funny as hell if that site used cgi or asp
normally I wouldn't have posted saying that but this seems like a spam thread anyway - phparion, on 10/12/2007, -1/+0@rdvilibiss
you are working in programming for the last 30 years? that's cool... and you think this article is useless... ok for the sake of agrument I agree with you.. Please give me the links of your articles or tutorials or any efforts you have made till now to contribute to PHP learning community let me see how a 30 years experienced programmer writes articles so that many here can learn from you the art of writing article... and this offer is for all others who are talking about bad spellings and less information in the article... the following is for all of you
"there was a guru artist.. once he thought to get feedback about his all time masterpiece from the people so he hanged his painting in the street and placed a notice underneath 'if you see any mistake please place a dot there' .. the next day his all painting was full of dots.. he again hanged his worse ever artwork in the street and this time he placed the notice 'if you see any mistake please correct it' that painting remained there for months but nobody put a single line anywhere..
so if you think this article has shortcomings then please show us what is a good article that you have written... forget about php.net.. even php.net is nothing without contributors.. go to the manual and you get your answer in the comments of users but not in this manual itself mostly..
as far as it is about spelling mistakes the author also confess that it was a long article and he might have made mistakes and they should be ignored or corrected... - phparion, on 10/12/2007, -2/+0this is a very good article and discuss all concepts related to array in fairly good details. I think guys here are out of their minds and posting comments without reading the full article. author does tell in the end that he has left many topics related to arrays because it could make it very long to discuss all related functions and concepts.
some idiots are saying that PHP is a basic language and this article is simple and doesnt deserve place on digg.com well.. give me the links to your articles and let me see how good and advance articles you have written ?
as long as it is about howtoforge.com that is a great website and many sites are based on drupal like digg.com itself so it is not a crime to make drupal based sites and why a person will criticise an articles site like this.. they are working hard to provide you FREE knowledge and you are behaving like this.. the fact is that you guys are perfect ***** and dont know anything and are just posting ***** here to destroy a very good article.. i really appreciate this articel and hard efforts of howtoforge.com to post such great stuff for php learners.
I dont care how many spelling mistakes are there or who is posting the article i want knowledge from wherever it comes and author has added to the knowledge of many so the howtoforge.com site... and they are doing great job for php community. Words are important than the speaker so dont try to talk loosely about any articel or tutorial.. I know how good you people are and how advance and good articles you have written.... i know your reality... just to tell you remember the day when you wrote the first Hello World programme and you were feeling good however that was ***** basic thing to display hello world on the page... if you know something already it doesnt mean it shouldnt be there anymore.. there are many who want to learn and they badly need this stuff. so think ten times before you criticise any article.... - etchalon, on 10/12/2007, -6/+3Alright. Didn't know.
- pengu, on 10/12/2007, -3/+0No, see carwashes are MORE complex than pizzas. everyone knows a REAL carwash has topless (or bikini) chics washing the cars. so in the basic elements (when pressed against a window) the boobs make 4 circles! (two boobs, each with a nipple)
and you have different SIZED circles. and of course if you have 'butter face' chics, you have squares too (paper bag over head)! - inactive, on 10/12/2007, -4/+1Well.. I think thats wrong. I found learning Ruby on Rails a lot easier. So now I know Ruby as well as Rails, and I went back to PHP and it seemed simple.
- drakethegreat, on 10/12/2007, -15/+11If you need anything besides the PHP manual for understand how to use arrays then you should consider doing something with your time that suits you better because programming isn't working. Maybe go start a pizzeria or something.
- f00xx0riz3r, on 10/12/2007, -9/+5crilen007, read what?! We need you to help us. Please write a tutorial and post about it to digg!
- etchalon, on 10/12/2007, -6/+1My favorite part? The completely ripped design from Mozilla.org.
- Palmetto, on 10/12/2007, -15/+4can anyone here tell me how to use phpadmin? Mysql? Drupal?
Thanks in advance.. - marnaq, on 10/12/2007, -26/+6So they have arrays in PHP now?? Cutting edge technology. I wonder what will be on the front page tomorrow...


What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official