English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I know that $admin is a variable but I don't understand what the "->" means as it relates to "imgfolder"

2006-10-14 12:48:03 · 5 answers · asked by The Bearded One 1 in Computers & Internet Programming & Design

5 answers

When you see references such as => or -> it's simply referencing an object and it's property...

It's an array :-)

So instead of $row[2] your doing $row->nameofVariable

You could have MANY things stored in one object

$row->fname = 'Joe'
$row->lname = 'Hensen'
$row->gender = 'male'

THEN you would use:

echo $row->fname;
OR
echo $row->lname;
OR
echo $row->gender;

Make sense?

Remember that if your storing something into an array using this method you do not need a dollar sign infront of the variable name... if your using one at all....

2006-10-14 13:07:58 · answer #1 · answered by Joshua H 2 · 0 0

It's pointing to the variable "$imgfolder" within the object that "$admin" contains. It means the same as "admin.imgfolder" in other C-like languages, but the period "." has a special purpose in PHP so an arrow is used instead.

Look up "PHP classes" for more about this.

2006-10-14 13:02:53 · answer #2 · answered by G. Whilikers 7 · 1 0

It is used to send the variable to an object function or a data element.

http://us2.php.net/zend-engine-2.php

2006-10-14 13:00:14 · answer #3 · answered by CHEVICK_1776 4 · 0 0

The fish symbol used by Christians during the Roman persecutions.

2016-05-22 02:18:09 · answer #4 · answered by ? 4 · 0 0

is it an arrow?

2006-10-14 12:50:44 · answer #5 · answered by Anonymous · 0 1

fedest.com, questions and answers