473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

newb question

hi guys, i just started learning php, and am qurious what the arrow
sign operator mean..
for ex:

$this->dbConnect();
can someone explain it to me?
thanks.

May 10 '06 #1
3 1181
Rik
fatbeaver wrote:
hi guys, i just started learning php, and am qurious what the arrow
sign operator mean..
for ex:

$this->dbConnect();
can someone explain it to me?


In short:
It calls a method or variable from an object.
Reading material:
http://www.php.net/manual/en/language.oop.php
http://www.php.net/manual/en/language.oop5.php

Grtz,
--
Rik Wasmus
May 10 '06 #2
fatbeaver wrote:
hi guys, i just started learning php, and am qurious what the arrow
sign operator mean..
for ex:

$this->dbConnect();
can someone explain it to me?
thanks.


You must really be new to programming in general.

The "->" notation is used to reference a method or a variable off of an
object. It's all about Object-Oriented Programming.

There are many good books and references on the subject of OOP. I suggest
you avail yourself of them.

--
-- Edmond Dantes, CMC
And Now for something Completely Different:
http://nailer.SlamItYourself.com
http://occupational.CraftyMen.com
http://running-shorts.internet66.com
http://sphynx.KindPets.com
http://grooves.SlamItYourself.com
http://kitchen-counter.ideas4yourhome.com
http://candles.WeddingJoyBells.com
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
May 11 '06 #3
fatbeaver wrote:
hi guys, i just started learning php, and am qurious what the arrow
sign operator mean..
for ex:

$this->dbConnect();
can someone explain it to me?


Ignore it. Learn PHP first, then worry about that one.

It's a whole different way of programming, but unless you know the
language very well in the first place, it will just make things more
confusing.

However, to satisfy the question the -> is referring to a method or
member of a class.

Basically; You can code in objects, which is in very simple terms,
where everything is like a real life object.

e.g. imagine a person object. A person has a name, age, hair colour
etc, so if you had written a person "class" you would use it in you
code with the -> operator. Like...

$someChap = new person(); // set the variable $someChap to be a person
object.

$someChap->name = "Bob";

Anyway, as I said, learn PHP properly first, then worry about all this
stuff. It will make you a better programmer, in my opinion.

Good luck and enjoy it.

Nathan

May 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
0
by: David E. | last post by:
So as a programmer, what's the best thing to study? EJB? How much of the J2EE or Enterprise architecture is necessary to no? I guess I need a good overview for a newb like me... thanks.. --...
3
by: Walter | last post by:
But I'm stumped..... I've got a windows 2000 server and I am trying to set up PHPBB on it using a mysql database.. I am very inexperienced on this..... Ive installed mysql V4.0.20d and I can...
3
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
6
by: Sean Berry | last post by:
Hello all I have build a list that contains data in the form below -- simplified for question -- myList = ,, ...] I have a function which takes value3 from the lists above and returns...
5
by: none | last post by:
hi all, (i am running on win 2k pro). i saw a program i like on a website and when i went to download it it was just a load of 'c' code. now, i know very little about 'c' or programming but...
2
by: python programming newb | last post by:
Hi all, first post. I'm new to python and tkinter. I'm trying to write a program that opens the root window with a button that then opens a toplevel window that then has it's own widgets. I...
2
by: J | last post by:
Greetings Group- I'm trying to put together a pattern matching script that scans a directory tree for tif images contained in similar folder names, but running into a NewB problem already. Is it...
1
by: jgibbens | last post by:
First, thank you for even looking at my question. I am using VB 2005 and I have a question about XML. what I want to do is: 1. keep adding to this file with out over writing it 2. be able...
3
by: DaveJ | last post by:
Hi everyone, I really was hesitant to post here for fear of seeming foolish but I really am desparate, and do appreciate any opportunity to get answers from real people. So please forgive the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.