PHP Tutorial (& MySQL) #8 - Multidimensional Arrays

preview_player
Показать описание
Hey gang, in this PHP tutorial we'll talk about a third kind of array - a multidimensional array, which is essentially just an array of arrays.

----------------------------------------

🐱‍💻 🐱‍💻 Course Links:

🤑🤑 Donate


🎓🎓 Find me on Udemy

Рекомендации по теме
Комментарии
Автор

I never see someone who teaches php like you. Thank you very much (my English is no good).

moussasamake
Автор

excellent series thank you so much !!
tips for better way to view tables :
echo '<pre>';
print_r($tableName);
echo'</pre>';
and for more details
echo '<pre>';
var_dump($tableName);
echo'</pre>';

dontargetme
Автор

This is a great channel and you have done a good job so far. I am a college student for programming and next quarter we start using PHP so I wanted to get a few months practice in before then. So far your tutorial has been just as good as my instructor's lectures on the other programming languages we are learning. I look forward to finishing this series, thank you for providing such a great tool for developers in the making!

jameshalstead
Автор

Multidimensional arrays are super useful especially when using MVC and passing data to Vue components. I can pass a single prop and put all the data and arrays inside of it instead of passing multiple props.

HostDotPromo
Автор

Bro aint holdin back on those video game references ☠️
Hope Nintendo doesn't come after him

thevajmin
Автор

amazing explanation, I've seen dozens of tutorials with multidimensional arrays but this one is the one that made everything clear. From this moment I'm looking forward to watch your tutorials. Thanks a lot!

AndreiSzao
Автор

Awesome introduction to PHP for Newbies. Thanks so much. Great contents.

tg
Автор

Hey Shaun, just wanted to let you know that there is a channel called "Codex Tron", who just reuploads your videos you should report it and take his videos down.

prince
Автор

sir pls continue with the series and let it not be limited to a basic level....let it go to all its roots upto advance

harshwardhankoushik
Автор

i'm loving this series! what is the difference between print r and echo?

shannonstumpf
Автор

Awesome job. Can't wait to see you explain how superglobals work. Mainly cookies, sessions, post, get etc ...

Hejhouyou
Автор

array_pop function can also delate the last item of array but when we store this function inside the variable it delate the last item in this array and store that delated item inside the variable so it make sense right now we've just echoing this variable by print_r() function

hotsmissed
Автор

omg i just learned a sublime shortcut hheehehe

naj_skcir
Автор

sir how to insert Multidimensional Array values in assending order in database...plz sir reply

TheYogaMagic
Автор

sir i have one doubt my array is this
$data=array(array('India'=>'1', 'usa'=>'2'), array('India'=>'3', 'canada'=>'7'));

and i want this output to print
Array('india', '1', '3');

Array('usa', '2', '0');

Array('canada', '7', '0');
how to do

siddhantsawant
Автор

How can we take results from an mysql query (oci) and dump the values to the array..

for example, it my query I have the results of product id, name and price (3 "columns") and it returns 3 records. How can I add each record/row from the query and add them into an array? I think I have to use a loop right? then what array_add or something like that? I think this is called array_push correct? how to loop and add it?

cdnsilverdaddy
Автор

How to create multi dimensional array with array variables

$var = array ( array(
array(1, 2, 3, 4),
array(2, 4, 3, 6),
array (7, 5, 3, 2) ),
array(
array(1, 2, 3, 4),
array(2, 4, 3, 6),
array(8, 5, 4, 3) )
);

I want to create the above array with array variables like below
$a = array(1, 2, 3, 4);
$b = array(2, 4, 3, 6);
$var = array ( array(
$a,
$b,
array (7, 5, 3, 2) ),
array(
array(1, 2, 3, 4),
array(2, 4, 3, 6),
array(8, 5, 4, 3) )
);
But it is giving errors
How to implement this ?
Thanks in advance.

babuvanam
Автор

Oooohps, Shaun I have a problem related with your "react redux and firebase series" marioplan; there's a breaking changes to the react redux firebase, can you just adress even with 2 minutes video, if it's not too much to ask. As always keep up the good work.

Greetings from Tanzania 🇹🇿

raymondmichael
Автор

Is not it better to present examples using xdebug? Visually better.

JACKoPL
Автор

<?php

$blogs = [
['mario', 'luigi', 'yoshi'],
['peach', 'bowser', 'toad'],
['luigi', 'bowser', 'koopa']
];

$characters = array('mario', 'luigi', 'yoshi',
array('peach', 'bowser', 'toad'),
array('luigi', 'bowser', 'koopa'));

$items[] = ['mario'=>'luigi', 'yoshi'=>'bowser', 'peach'=>'toad'];

echo $blogs[2][1] . '<br>';
echo $characters[4][1] . '<br>';
echo $items[0]['yoshi'] . '<br>';

kvelez