Skip to content

Instantly share code, notes, and snippets.

@MubinSayed
Created September 25, 2018 02:12
Show Gist options
  • Save MubinSayed/7abf8933d1c0cbce44c246c24b56b366 to your computer and use it in GitHub Desktop.
Save MubinSayed/7abf8933d1c0cbce44c246c24b56b366 to your computer and use it in GitHub Desktop.
<?php
// associative array examples
$cart = array( 'Hotel' => 95, 'Chicken65' => 'Restaurant', 45 => 'xyz' );
// or
$list = [
'Hotel' => 95,
'Chicken65' => 'Restaurant',
45 => 'xyz'
];
//or
$list = array();
$list['Hotel'] = 95;
$list['Chicken65'] = 'Restaurant';
$list[45] = 'xyz';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment