?
Solved

Need a quick explination on $this = $that = $theotherthing = array ();

Posted on 2009-04-23
3
Medium Priority
?
210 Views
Last Modified: 2012-05-06
Been seeing something recently that I'm not quite clear on.  Could someone give me a quick explanation or link to where I can find out.. What is the code snippet doing and how might it be usefully?  I guess I'm just wondering how they all relate.
<?php
$this = $that = $theotherthing = array ();
?>

Open in new window

0
Comment
Question by:graphxdiva
  • 2
3 Comments
 
LVL 18

Expert Comment

by:Hube02
ID: 24217217
That code would be the same as:

$theotherthing = array();
$that = $theotherthing;
$this = $that;

Just on a single line.
0
 

Author Comment

by:graphxdiva
ID: 24217352
Ok so just a quick version of..

$this = array();
$that = array();
$theotherthing = array();

in this case.  Thats what I figured but wasn't sure if it was building some kind of associative array.
0
 
LVL 18

Accepted Solution

by:
Hube02 earned 2000 total points
ID: 24217416
Yup, you it. It could be useful if you want several variables to start with the same value. Minimalist coding...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month17 days, 12 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question