Jump to content

WHAT IS => I Cannot find it on the internet!


freedomflyer

Recommended Posts

I don't think it has an officially official name, but it is indeed an assignment operator for arrays.

 

key => value

$names = array('Firstname' => 'John', 'Lastname' => 'Doe');

 

You can also use it in foreach loops to make use of the keys and values

 

foreach($array as $key => $val) {
   echo "key: $key  val: $val <br />";
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.