Added: 4 years ago
From: thenewboston
Views: 62,067
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (67)

Sign In or Sign Up now to post a comment!
  • So this is only possible with PHP and not with XHTML/Notepad++?

  • @Mertt03 What do you mean? Arrays are used in heaps of different type of programming languages. As XHTML is not a programming language, it does not 'use' arrays. Also Notepad++ is a text editor.

    Sorry if I missed the point to your question, it's not very clear.

  • @archange156 No you didnt miss the point. A month ago i was a starter so didnt know anything about Html Javascript and Css and PHP! A mont later i know the difference between these things so i should have learned all these things before asking questions :(.

    So sorry for the dumb question anyway thanks for the time answering my dumb question :( Take care

  • @Mertt03 Hey, no problem! It's good to know you went off and learned all these things.

    If you don't ask questions, you'll never learn ;)

  • Guys and Girls, if you want to print out all the names just do the following:

    echo $people[0].$people[1].$people[­2]; Boom

  • Nice tutorial. But what if i want to add 0,1 ?. How can i ?. Is it possible. Thanks

  • I'm watching this on 2011, where Bucky has advance equipment to make tutorials and also has a podcast. That's an amazing improvement! Nice job Bucky.

  • this is a lot like python

  • @TheYoungBucks12 that ti is.. and java.. both languages are similar and its close to perl as well.. they are all object oriented programing so its all kinda similar

  • @TheYoungBucks12 It is indeed. Also similar to Java as well. =)

  • if i want to display all three names at time then what?

  • @sushant1942 You do a loop, and what you want the loop to do is print one item every time a loop does a step. If you need more info, just reply

  • you sound more lively during your javascript tutorials

  • i still dont get array. its like assigning values. how can we use it in real life projects.

  • @wheay21 use it in a for loop or summin

    NOTE: this is written in java not php but it is still the same really

    example:

    String array[] ("Tom", "Joe", "Adam");

    for(int i =0; i < array.length;i++) // this bit is the for loop to go through the array till i is the same as the array

    system.out.println(array[i]) // this bit prints out a line on the screen of the current word in the array

    thats the basic principle i anybody else has got questions then just pm me :)

  • Tonny

  • whats the difference between 'tom' and "tom"?

  • @NeigborhoodBoards

    the place in the memory

  • @NeigborhoodBoards

    the address in the memory

  • @NeigborhoodBoards

    it's just another way of achieving the same thing: setting Tom in the array at [0]

  • i have a doubt teacher x) when do you know when you got to use 'tom' or "tom"?

    I mean, how do I know when I got to use apostrophes or those things which name I am too sleepy to remember ---> "

  • @Diifusal

    did you find out yet cuz i want to know also. lol

  • @liquidmetaltech no, not yet x)

  • Cool shot, thanks

  • how can i just make an array and not give any value into it and just give it values when i need em?

    something like &people=array[10] to give it 10 values?

  • @TheSecOrg you can declare $people=array()...i hope that i understood correct

  • guys, how to get inputs of array using forms?

  • like python

  • This is slightly off topic, but I've been wondering it for a while.

    Why is your Windows XP interface glossy/shiny, and regular Windows XP versions are plain?

    Is it a custom theme or different version of Windows XP?

  • does PHP have vectors? btw really good tutorials. Guessing you can't make arrays on the fly in PHP?

  • Thank you. - behindvfx

  • By the way when going to a private institution, what they want is those federal dollars, so instructors usually trying to collect a paycheck, and the school trying to recruit students don't always provide quality education. This genteleman is spectacular in teaching.

  • @cicero60804 Agreed, I wish I had him, my teacher was terrible now I'm having to reteach myself.

  • Why thank you Roy.

  • Looks like Java. So if you learn and understand this you won't have any problem with Java. :-)

  • hi!!! what is the code if the output using array 0 00 000 0000 00000 000000 0000000 00000000 000000000 0000000000
  • Hey sturm7drang, maybe he learned it the same place you learned English.

  • He is demonstrating two different ways to declare an array. You can either declare everything at once by:

    $people=arrary('a1','a2','a3') Or do it individually by:

    $people[0]="a1";

    $people[1]="a2";

    His only mistake was not deleting the first array he wrote before he moved on to the second method of declaring arrays so people who can't think three dimensionally wont get any wrong ideas about having to declare twice.

  • @sturm7drang He shows both ways you dumb fuck.

  • @TheTIprogrammer

    the 1st one doesnt work for me, dunno why..

    heres the lines:

    $people=array('tom','jake','to­ny');

    $people[2];

    and i get a blank page

    the second method is just fine

    why is that?

  • @Vladibeer You have to echo it. echo $people[2];

  • @TheTIprogrammer

    Ye that makes sence

    just didnt hear the 2:33

    ty

  • @Vladibeer You're welcome!

  • @TheTIprogrammer what if im using forms, i dont know how to get inputs of array...

    like if i input "300" in the form, the output should be "three hundred"?

  • @Vladibeer Because you didn't "print" or "echo" it..

    replace " $people[2];" with " print $people[2]; "

  • @sturm7drang hey sturm if u knw better then make ur tutorial and see ur own tutorial :)

  • tony macaroni?

  • ok before i watch this i want to say arrays never are explained in a book properly to understand so if this guy explains it well i willsend him a free book. i doubt he will but we will see after the video is over i will let you know if he explained it well. my degree is in math an array is simple but php books suck at explaining it

  • ok yes he explained it the best, it is so easy but books make it a hard concept

  • you forgot to put echo $people[2]

  • can i ask why you defined the $people[1] [2] [3] as each related name?

    If you just echo'd $people[1] without explicitly defining it, it still printed the second name in the initial array?

  • maybe because he just wanted to show that you can assign them the other way?!

  • nice tut for beginners! but you should have commented the three people lines for them to see it works. the way you shown it seems like it overwritten the variables. anyway, good job! tnx for the tutorials!

  • wow! this tutorial is really great!!

  • Thank You Very Much!

    I need somebody with a human touch!!

  • Good tut son.

    I still prefer to do it like:

    $config['meta_desc'] ="Like this";

  • python now

  • things are starting to really clear up, much easier to learn from you than my book, that's for sure:D 5*

  • Thank you for your time.

  • thanx..

  • thanx..

  • good tuts on array

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more