hi this is Raghu from tutorial come and welcome to PHP video series in this lecture we will see what are multi-dimensional arrays with an example so multi-dimensional arrays are nothing but in each element in the main array can also be in a way so it means so we can have arrays inside arrays so this concept is called multi-dimensional arrays so let’s take a look at an example so I’m saving the associative file as multi-dimensional so you can create a new file and copy the code from associative dot PHP so I just I don’t want to type this again and again so here we only have we created one type of array so let me create it multiple times okay so here I’ll just rename the first array to array 1 and then array to and the name name I can keep this as same and I can give names like Java it is some 10 years gender is not applicable the next one is PHP ages 20 years gender is not applicable and then inside my array actually this first type of arrays if you see it is an associative array and the second array is there also an associative array the third array we will make it as multi-dimensional array so we need to use arrays so what can we do here so let’s give the KS first it means say first it is a first array and let’s give this second just a second array and here we will use the Irate dollar array1 and here tovahleh all right – so this is an array and insert array we have another two rings so let’s use the same loop for each array key value so the key and the values so item just printing it let’s see whether it will work or it will throw some exceptions so not the suicide you dot PHP we need the multi-dimensional dot PHP so I am getting some exceptions saying that are ready to string conversion so which means so here this line is a string and keys are so string because in array the key is nothing but first and second this also the string and and the value is also string but the value value is not string because first time it is array 1 and second time it is our way too so we can’t directly use value what can we do is we can print a specific screen like we can print the name so if you want to print the name give here has name ok let’s save and reload so if you see the keys first and the value is Java the key is second and the value is PHP similarly we can also print several like that key is here and then name now keys come the name is and each piece here will simply change it to age solids so here I am printing the key with the name and the age so the first the key is first the name is Java and editing the key is second the name is PHP in Daisy’s 20


Google Plus

Apache Zookeeper Tutorial

Apache Kafka Tutorial

Apache Kafka Security

Elasticserarch n Kibana

Java 8 Tutorial

Log4J Tutorial

Apache Storm Tutorial

SQLite Tutorial

Apache Ant Tutorial

Related Posts


Apache Kafka Commands Cheat sheet

Spread the loveKafka Topics List existing topics bin/kafka-topics.sh –zookeeper localhost:2181 –list Purge a topic bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –config retention.ms=1000 … wait a minute … bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –delete-config retention.ms
Read more…


What is Apache Maven | Apache Maven complete tutorial from scratch pdf

Spread the love In this post you will learn the complete tutorial of Apache Maven build tool What is Maven ? Apache Maven is a software project management and comprehension tool. Based on the concept
Read more…


Practical Guide for Web Development in 2018

Spread the loveWelcome to my practical guide  for web development in 2018 in terms of  technology and career. Before we start I just want to  mention a few things, you don’t need to learn  everything that
Read more…