Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-23-2004, 01:26 AM   #1 (permalink)
JeC
Registered User
 
JeC's Avatar
 
Join Date: Feb 2003
Location: Australia
Posts: 46
JeC is on a distinguished road
PHP Syntax Query (What is this ?)

I'm making head way into modifying PHPBB boards, and apart from the shock of the professional looking code, theres some syntax I haven't noticed before.

Code:
$template->assign_block_vars('catrow.forumrow',	array(ect... ect...) );
My questino is what does the '->' thing do? I haven't seen it before. Is it just simply an assignment operator? putting the value of the function into $template ?

-jec-
JeC is offline   Reply With Quote
Old 06-23-2004, 01:32 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,713
redhead is on a distinguished road
the '->' is accessing a member function/variable within the template class.
When you program in OOP, you create functions for the classes, in order to reach them you need to dereference by using '->' or '.' depending if the class is call by reference or called directly.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 06-23-2004, 03:49 AM   #3 (permalink)
JeC
Registered User
 
JeC's Avatar
 
Join Date: Feb 2003
Location: Australia
Posts: 46
JeC is on a distinguished road
thanks red, that's shed some light on the situation. I'll get the jist of OOP soon I hope
JeC is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Comes of Age sde Code Newbie News 0 04-14-2004 11:41 AM
new to php jhoop2002 PHP 12 08-06-2003 02:45 PM
I need to learn PHP Nitro PHP 9 06-28-2003 11:24 AM
Php Vs. Asp sde PHP 6 06-06-2003 06:02 PM
highlight_string($string) - php syntax highlighting sde PHP 0 07-30-2002 02:19 PM


All times are GMT -8. The time now is 02:08 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting