Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

PHP array() Function

php php array function
PHP array() Function

Create an indexed array named $name, assign two elements to it, and then print a text containing the array values.

In PHP, there are three types of arrays.

Indexed arrays - Arrays with numeric index

Associative arrays - Arrays with named keys

Multidimensional arrays - Arrays containing one or more arrays

$name = array("Alex","24");
echo "My name is ".$name[0]. " and my age ".$name[1]. ".";


My name is Alex and my age 24.


Html code work in comment box

Related Post