Learn PHP Arrays
Learn about PHP ordered and associative arrays and how this data type is used to store, access and manipulate data.
StartKey Concepts
Review core concepts you need to learn to master this subject
PHP Apending Arrays
PHP Ordered Arrays
PHP array funtion
PHP print_r function
PHP Nested Arrays
PHP array_push function
PHP Square Bracket Arrays
PHP array_pop function
PHP Apending Arrays
PHP Apending Arrays
$string_array = ["first element", "second element"];
$string_array[] = "third element";
// $string_array is now: ["first element", "second element", "third element"]
In PHP, elements can be added to the end of an array by attaching square brackets ([]) at the end of the array’s name, followed by typing the assignment operator (=), and then finally by typing the element to be added to the array.
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory