PHP Basics: Arrays

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
9,086
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 30, 2011

How to create an array, and assign values to either default or defined keys. Also speaks about foreach construct briefly.

Official website
http://phpacademy.org

Support Forum
http://phpacademy.org/forum

Follow us on Twitter!
http://twitter.com/phpacademy

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (phpacademy)

  • lets say my array is $row

    i pick out stuff with a foreach loop $row -> $r

    like so:

    if(isset($row)) { foreach($row as $r){ etc etc

    How can i make sure I only show items where $r -> title == "test" for example?

    I tried tons of things but it doesn't work as planned. thanks!

  • @vi54 It would be much better for you to visit the forum and post a topic. That way, active members can all have a look at it. It's also a lot easier to help in a forum environment.

Top Comments

  • In an earlier video I said I was called Billy.

    But now you know my age!? You're not just the god of PHP, but of the world!

see all

All Comments (16)

Sign In or Sign Up now to post a comment!
  • What does print_r do?

  • Holy God!!

    When I hate arrays ever since of my 1st year of college until now.. which I'm 3rd year of College... and now.. once that I've come to realized... it's just easy @_@

    I love on how you explain things!!!!

  • @Starcraft2Rogue check out the swear word filter, substituting arrays, or try to improvise with an if statement

  • nice tutorial. However, I wish you could also explain when or where to use the brackets appropriately. Im a newbie in here sorry.. But i like the way you present

  • @phpacademy I've got a quite ''advanced question''lets say i make an menu.Then i echo 'Press key K to go to commands propt'.How would i make the command to when the user types K it goes to the command prompt?Thanks for the tutorials!

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