Ask the experts to interpret a small segment of unlimited classification code, and unlimited classification
Foreach ($ rows as $ id => $ item)
{
If ($ item ['pid'])
{
$ Rows [$ item ['pid'] [$ item ['id'] = & $ rows [$ item ['id']; // This is the main part. can you elaborate on it?
$ T [] = $ id;
}
}
Reply to discussion (solution)
Foreach ($ rows as $ id => $ item) {// $ rows is? Array, split? Value? If ($ item ['pid']) {// if $ item ['pid '] is not false $ rows [$ item ['pid'] [$ item ['id'] = & $ rows [$ item ['id']; // This is the main part. can you elaborate on it? // Me? Are you listing array's ??? /** Array (? => Array ('id' => '? ', 'Pid' => Array ('id' => $ rows [$ item ['id']),),); /**/$ t [] = $ id ;//? $ T ?? Array append value }}
For
$rows = array( 1 => array( 'id' => 1, 'pid' => 0 ), 2 => array( 'id' => 2, 'pid' => 1 ), 3 => array( 'id' => 3, 'pid' => 2 ), 4 => array( 'id' => 4, 'pid' => 3 ),);
$ Rows [$ item ['pid '] [$ item ['id'] = & $ rows [$ item ['id'];
The premise is that the keys and IDs of the array $ rows are the same.
Foreach ($ rows as $ id => $ item) {// $ rows is? Array, split? Value? If ($ item ['pid']) {// if $ item ['pid '] is not false $ rows [$ item ['pid'] [$ item ['id'] = & $ rows [$ item ['id']; // This is the main part. can you elaborate on it? // Me? Are you listing array's ??? /** Array (? => Array ('id' => '? ', 'Pid' => Array ('id' => $ rows [$ item ['id']),),); /**/$ t [] = $ id ;//? $ T ?? Array append value }}
Why does this & symbol play the same effect as recursion?
For
$rows = array( 1 => array( 'id' => 1, 'pid' => 0 ), 2 => array( 'id' => 2, 'pid' => 1 ), 3 => array( 'id' => 3, 'pid' => 2 ), 4 => array( 'id' => 4, 'pid' => 3 ),);
$ Rows [$ item ['pid '] [$ item ['id'] = & $ rows [$ item ['id'];
The premise is that the keys and IDs of the array $ rows are the same.
The moderator often writes the following code: $ SQL = <
<Identifier
Identifier;
A custom identifier, just like a string enclosed by "" or ''. it is enclosed by an identifier.
The identifier is user-defined. you can give it a name that is close to the content.
<Identifier
Identifier;
A custom identifier, just like a string enclosed by "" or ''. it is enclosed by an identifier.
Identifiers are user-defined. you can give the identifiers a name that is close to the content.
Thank you very much, but what is the function of writing this? Generally, what is the use case? In my opinion, it is used to escape symbols on the internet. if so, is it not possible to avoid safe processing functions? However, there are few materials on the Internet.