Array
Associative Array Example in PHP
<?php $data = array( 'name'=>"John Doe", 'age'=>20, "company_name"=> "XYZ" ); echo $data['name']. "\n"; echo $data['age']. "\n"; echo $data['company_name']. "\n"; ?> Output: $ php associative_array.php John Doe 20 XYZ
PHP: Arrays
In this post, we’ll talk about Arrays in PHP. What is an Array? An array stores multiple values in one single variable. An array is a special variable, which can hold more than one value at a time. If you have a list of items (a list of car names,[...]