How To Retrieve Values out of an Array?

deepak singh
Posts: 686
Joined: Fri Sep 30, 2016 4:19 pm

How To Retrieve Values out of an Array?

Postby deepak singh » Sat Oct 01, 2016 5:18 pm

How To Retrieve Values out of an Array?

rameshkhd
Posts: 1279
Joined: Sun Aug 28, 2016 10:45 am

Re: How To Retrieve Values out of an Array?

Postby rameshkhd » Sat Oct 01, 2016 5:18 pm

You can retrieve values out of arrays using the array element expression $array[$key]. Here is a PHP example script:
<?php $languages = array(); $languages["Zero"] = "PHP"; $languages["One"] = "Perl"; $languages["Two"] = "Java"; print("Array with inserted values:\n"); print_r($languages); ?>
This script will print:
Array with default keys:
The second value: Perl

Array with specified keys:
The third value: Java


Return to “PHP”

Who is online

Users browsing this forum: No registered users and 2 guests