EYE Page Builder

Associative

WordPress is written in the PHP programming language and hence as a WordPress user you may come across them while working on WordPress themes or plugins or by simply looking at the core WordPress code. In PHP, the array() function is used to create them. There are three types that can be created in PHP:

  • Indexed – use a numeric keys to access values
  • Associative – use text or string keys to access values
  • Multidimensional – contain more than one array

Many arrays are used to loop through a set of data and perform some sort of operation on each value. For example if you have three pieces of fruit you could store each as a separate variable like this:

1
2
3
$fruits1 = "apple";
$fruits2 = "orange";
$fruits3 = "banana";

This can quickly get very messy. A better solution would be to put them all in an array like this:

1
$fruits = array("apple", "orange", "banana");

Now you can do things like use built in array functions to perform operations on the data. For example, count() would tell you how many elements are in your array. $fruits[2] would equal ‘banana’ (arrays start at zero).

[/eye_text]

[/eye_text]

Multidimensional

WordPress is written in the PHP programming language and hence as a WordPress user you may come across them while working on WordPress themes or plugins or by simply looking at the core WordPress code. In PHP, the array() function is used to create them. There are three types that can be created in PHP:

  • Indexed – use a numeric keys to access values
  • Associative – use text or string keys to access values
  • Multidimensional – contain more than one array

Many arrays are used to loop through a set of data and perform some sort of operation on each value. For example if you have three pieces of fruit you could store each as a separate variable like this:

1
2
3
$fruits1 = "apple";
$fruits2 = "orange";
$fruits3 = "banana";

This can quickly get very messy. A better solution would be to put them all in an array like this:

1
$fruits = array("apple", "orange", "banana");

Now you can do things like use built in array functions to perform operations on the data. For example, count() would tell you how many elements are in your array. $fruits[2] would equal ‘banana’ (arrays start at zero).

[/eye_text]

[/eye_text]

[eye_featured-block shortcode_id=”mc4jka9g9″ text_width=”100″ text_position=”center” text_align=”left” top_padding=”0″ bottom_padding=”0″ border_style=”default” animation_delay=”0″]

DeshiSoft is your partner in IT product development. We are a consulting and development firm specializing in taking your dream venture however big or small into real business.

[/eye_featured-block]

[eye_featured-block shortcode_id=”b3f430mqdj” text_width=”100″ text_position=”center” text_align=”left” top_padding=”0″ bottom_padding=”0″ border_style=”default” animation_delay=”0″]

DeshiSoft is your partner in IT product development. We are a consulting and development firm specializing in taking your dream venture however big or small into real business.

[/eye_featured-block]

[eye_featured-block shortcode_id=”1uxr9jid1b” text_width=”100″ text_position=”center” text_align=”left” top_padding=”0″ bottom_padding=”0″ border_style=”default” animation_delay=”0″]

DeshiSoft is your partner in IT product development. We are a consulting and development firm specializing in taking your dream venture however big or small into real business.

[/eye_featured-block]