Thursday, 08 August 2019 08:19

How to use php arrays

Written by 
Rate this item
(0 votes)

A php array is called a special variable, which is able to hold 

more than one value at a time.

 Let's see how to create and use php arrays 

The array() function is used to create php array as follows - 

$the_cars = array("Suzuki", "Bmw", "Toyota");

To access array data we write it in the following way - 

echo " I like " . $cars[0] ;

 

There are 3 types of arrays - Indexed arrays, Associative arrays, 

Multidimensional arrays. google it to learn more about php arrays.

This was small tip to get a good idea about important php array, hope you liked it. 

I provide services on php, wordpress, joomla, codeigniter. If you need 

experts then hire me here - https://www.fiverr.com/share/0XozL 

Read 1693 times Last modified on Thursday, 08 August 2019 08:24
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest discussions

  • No posts to display.