• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Why is this PHP array not the same?

phparrays


PHP Snippet 1:

array( 'items[0][type]' => 'screenprint')

PHP Snippet 2:

$data = array('items' => array(0 => array('type' => 'screenprint')));

PHP Snippet 3:

$data = [
    'items' => [['type' => 'screenprint']]
];
echo $data['items'][0]['type'];

Related Snippets

Redis Command To Sort Keys

Laravel Unknown Column 'updated_at'

Confirm Leave on External Links in Wordpress

Open a popup box after receiving result from ajax

Hide specific products from unlogged users based in product category in WooCommerce

How do I remove this delivery notification from here?

PHP Array split string and Integers

xdebug 3 not working in ubuntu 20.04 with docker

WHM Enabling mod_rewrite

wordpress : How to specify the cause "This site can’t be reached"

RuntimeException: Unable to create the cache directory (/var/www/sonata/app/cache/dev)

Elastic Beanstalk with Laravel Envoy

Yii2 redirecting to previous page after login

how to upload binary image to sql server using php laravel

Get number of working days between two dates in PHP [duplicate]

About Contact Privacy policy Terms and conditions