What is Associative array | PHP Tutorial for Beginners to Advance Full Course | part 16

What is Associative array :

         The associative arrays are very similar to numeric arrays in term of functionality but they are different in terms of their index. Associative array will have their index as string so that you can establish a strong association between key and values.

 

Syntex :

        $variable_name = array('key'=>'value','key'=>'value');

 

Example :

     $user_info = array(

           'name'=>'your_name',

           'email'=>'your_email',

           'age'=>'your_age',

   );

Tutorial Topics