Home > Backend Development > PHP Tutorial > What is the subscript of $tg['x']='b';?

What is the subscript of $tg['x']='b';?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-06 13:53:11
Original
841 people have browsed it

$tg[]='q';
$tg['x']='b';
$tg[]='g';
? >

What is the subscript of $tg['x']='b';? Can it only be ‘x’? How is it arranged in the array?

Reply content:

$tg[]='q';
$tg['x']='b';
$tg[]='g';
? >

What is the subscript of $tg['x']='b';? Can it only be ‘x’? How is it arranged in the array?

php > $tg[]='q';
php > $tg['x']='b';
php > $tg[]='g';
php > print_r($tg);
Array
(
    [0] => q
    [x] => b
    [1] => g
)
Copy after login

The subscript is x, the second digit of the array

Didn’t you specify the subscript?

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template