Question about OOP

This is a discussion on Question about OOP within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Extended Partition wrote on Tuesday 21 October 2003 16:01: > Hello Everyone, > > I have a simple question ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-21-2003
Zurab Davitiani
 
Posts: n/a
Default Re: Question about OOP

Extended Partition wrote on Tuesday 21 October 2003 16:01:

> Hello Everyone,
>
> I have a simple question and need a bit of pointing in the right direction
> by someone more knowledgable than myself. Here's my problem:
>
> I need to setup an OOP array so I can access it like this:
>
> $varname[indexvalue].property1
> $varname[indexvalue].property2
>
> etc...
>
> Can someone explain to me how to set this up?
> For example, I'd like to be able to do something like
> $varname[indexvalue].property1 == "Hello"; and things like that. I know I
> sound like a newbie but I'd really appreciate some guidance.


class SomeClassYouProbablyDontEvenNeed {
var $property1;
var $property2;
}

$varname[0] = new SomeClassYouProbablyDontEvenNeed();

$varname[0]->property1 = "Maybe you just need an array.";
$varname[0]->property2 = "If so, create a multi-dimentional array then.";

--
Business Web Solutions
ActiveLink, LLC
www.active-link.com/intranet/
Reply With Quote
  #2 (permalink)  
Old 10-22-2003
Extended Partition
 
Posts: n/a
Default Question about OOP

Hello Everyone,

I have a simple question and need a bit of pointing in the right direction
by someone more knowledgable than myself. Here's my problem:

I need to setup an OOP array so I can access it like this:

$varname[indexvalue].property1
$varname[indexvalue].property2

etc...

Can someone explain to me how to set this up?
For example, I'd like to be able to do something like
$varname[indexvalue].property1 == "Hello"; and things like that. I know I
sound like a newbie but I'd really appreciate some guidance.

Thanks!
Anthony


Reply With Quote
Reply


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

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



All times are GMT +1. The time now is 10:59 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0