Your Ad Here

New Post/Thread Notification: PHP Forum

Hello,

welcomewiki has just posted in the PHP Forum forum of Wiki Newforum under the title of PHP Arrays.

This thread is located at http://www.wikinewforum.com/showthread.php?t=5856

Here is the message that has just been posted:
***************
**Associative* Arrays*

An associative array, each ID key is associated with a value.
When storing data about specific named values, a numerical array is not always the best way to do it.
With associative arrays we can use the values as keys and assign values to them.
*Example 1*

In this example we use an array to assign ages to the different persons:
$ages = array("Peter"=>32, "Quagmire"=>30, "Joe"=>34); *Example 2*

This example is the same as example 1, but shows a different way of creating the array:
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34"; The ID keys can be used in a script:
<?php $ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34"; echo "Peter is " . $ages['Peter'] . " years old.";
?> The code above will output:
Peter is 32 years old.
**Multidimensional* Arrays*

In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.
*Example*

In this example we create a multidimensional array, with automatically assigned ID keys:
$families = array
(
"Griffin"=>array
(
"Peter",
"Lois",
"Megan"
),
"Quagmire"=>array
(
"Glenn"
),
"Brown"=>array
(
"Cleveland",
"Loretta",
"Junior"
)
); The array above would look like this if written to the output:
Array
(
[Griffin] => Array
(
[0] => Peter
[1] => Lois
[2] => Megan
)
[Quagmire] => Array
(
[0] => Glenn
)
[Brown] => Array
(
[0] => Cleveland
[1] => Loretta
[2] => Junior
)
) *Example 2*

Lets try displaying a single value from the array above:
echo "Is " . $families['Griffin'][2] .
" a part of the Griffin family?"; The code above will output:
Is Megan a part of the Griffin family?
***************

Your Ad Here

FREE TRAINING By World's No.1 Site Wikipedia

Hi

Here the SAP HR Real Blue Print: http://www.wikinewforum.com/showthread.php?t=1410


Join us World's Best FREE SAP HR Training @ www.wikinewforum.com


Online Training (Any time you can log-in)

FREE SAP HR TRAINING

WITH REAL TIME SCREEN SHOTS

By World's No.1 Site Wikipedia



Duration: 40 Days Venue: Wikipedia Website

Timings: Any time you can open and can take training

Support: Any time 24/7

We called as Special training because:

  • Real Time Employees will teach & answers your queries
  • Real Time Scenarios
  • Real Time System screen shots step by step configuration
  • Post training support like Resume & Interview tips with exact requirement, we provide top companies HR email ID's and every day vacancy list.

Special Topics apart from general topics:

  • We teach special topics like following where no any dare to reach
  • Payroll & Time Schema's
  • Payroll & Time PCR's (Personal Calculation Rules)
  • Rates of Pay
  • Factoring/Pro-ration
  • Wage type Valuation
  • Time Quota's & Time Types
  • Time Evaluation
  • Absence Valuation
  • Integration wit FICO & other Modules
  • And more and more....list will not stop
  • Totally End-to-End implementation Process

Visit our Website

www.wikinewforum.com

Free Demo

http://www.wikinewforum.com/showthread.php?p=10222#post10222

Reach us

info@wikinewforum.com

Presented

World No. 1 Site - Wikipedia

Our Aim is to provide FREE SAP Training, hope you join.