PDA

View Full Version : Need some help with a hack im making. : (


Danny.VBT
20 Feb 2005, 20:01
Okay, so I'm making a hack and I need to use some of PHP OO features

Ie



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



And some of this is with an array

Ie



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



This is where the problem is. When I the page loads I just get



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



and nothing else....

the

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

is in the templates not the php file. Anyone have any ideas how I can fix this?

Dean C
20 Feb 2005, 20:25
Looks like you're not using OOP correctly. An object itself can't be an array. But it's properties can.

So $contents[$i]->title is technically impossible.

Danny.VBT
20 Feb 2005, 20:46
I don't know if I'm explaining it correctly. The code works when I hardcode it, but when I put it in templates it doesn't work.

I'm using someones elses code and integrating it with vb

I then use a simple form asking for a zip code and access all the data with
examples I used from my first post. Again it works when I hardcode it. :ermm:

Marco van Herwaarden
21 Feb 2005, 04:30
Isn't this what you're looking for:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Danny.VBT
21 Feb 2005, 05:06
^^^

I'll try that right now. :up: