Ask a Question related to PHP Development, Design and Development.
-
Sven #1
Re: Classes
do you get an error-message? which?
maybe you use
var $id = array();
instead of
var $id[];
ciao SVEN
Patrik Fomin wrote:> I need to create a class that looks like this:
>
> class Artikel {
> var $id[];
> var $rubrik[];
> var $ingress[];
> var $kategori[];
> var $frontbildtyp[];
> var $frontbild[];
> var $kategoribild[];
> var $aktuell;
>
> function SetId($id) {
> $this->id[$this->aktuell] = $id;
> }
>
> function SetRubrik($id) {
> $this->id[$this->aktuell] = $id;
> }
>
> function SetIngress($id) {
> $this->id[$this->aktuell] = $id;
> }
>
> function SetKategori($id) {
> $this->id[$this->aktuell] = $id;
> }
>
> function SetKategoriBild($id) {
> $this->id[$this->aktuell] = $id;
> }
>
> function SetFrontbildtyp($id) {
> $this->id[$this->aktuell] = $id;
> }
>
> function SetFrontbild($id) {
> $this->id[$this->aktuell] = $id;
> }
>
> function SetNextPost() {
> $this->aktuell++;
> }
>
> function SetStartPost() {
> $this->aktuell = 0;
> }
>
> }
>
>
> the problem is that php wont let me :/, any ideas?
>
> regards
> patrick
Sven Guest
-
new to php classes
Hi everyone, I am new to using classes in PHP development. Can someone tell me if it's possible to use a class inside a class. I am developing... -
two classes
how can I call class b method b, from class a method a ? -
AS2.0 & inner classes
Greetings... Does ActionScript 2.0 allow the creation of inner classes? Thanks. Respectfully, ASP -
First Go at Classes
So, here I am, I've been programming PHP for 6 years, and have never gotten into classes. Well, I finally decided to take the plunge, and here's my... -
ASP Classes vs COM
For the majority of my work, I just use plain ASP. On the rare occasion that I am doing something intensive that does require user interaction I... -
Patrik Fomin #2
Classes
I need to create a class that looks like this:
class Artikel {
var $id[];
var $rubrik[];
var $ingress[];
var $kategori[];
var $frontbildtyp[];
var $frontbild[];
var $kategoribild[];
var $aktuell;
function SetId($id) {
$this->id[$this->aktuell] = $id;
}
function SetRubrik($id) {
$this->id[$this->aktuell] = $id;
}
function SetIngress($id) {
$this->id[$this->aktuell] = $id;
}
function SetKategori($id) {
$this->id[$this->aktuell] = $id;
}
function SetKategoriBild($id) {
$this->id[$this->aktuell] = $id;
}
function SetFrontbildtyp($id) {
$this->id[$this->aktuell] = $id;
}
function SetFrontbild($id) {
$this->id[$this->aktuell] = $id;
}
function SetNextPost() {
$this->aktuell++;
}
function SetStartPost() {
$this->aktuell = 0;
}
}
the problem is that php wont let me :/, any ideas?
regards
patrick
Patrik Fomin Guest
-
mickeyg #3
classes
I like to hear from people who consider themselves PHP programmers if
the write and use classes is it worth while to learn classes?
mickeyg Guest
-
Phil Roberts #4
Re: classes
With total disregard for any kind of safety measures mickeyg
<meshulamtemp@yahoo.com> leapt forth and uttered:
Yes I do and yes it is.> I like to hear from people who consider themselves PHP
> programmers if the write and use classes is it worth while to
> learn classes?
>
>
--
Phil Roberts | Dork Pretending To Be Hard | [url]http://www.flatnet.net/[/url]
Phil Roberts Guest
-
Colin McKinnon #5
Re: classes
mickeyg spilled the following:
Bad question.> I like to hear from people who consider themselves PHP programmers if
> the write and use classes is it worth while to learn classes?
Classes are meaningless constructs without OOP. If you mean is is worthwhile
learning object-oriented programming using PHP, then yes I do, & yes it is.
C.
Colin McKinnon Guest
-



Reply With Quote

