Object Interfaces


Posted on 16th Feb 2014 07:03 pm by admin

EDIT: Never mind, I just updated to php 5.

Hey all,

I'm currently experimenting with php object interfaces. However, whenever I try to implement one, I get a php error.


interface iTemplate
{
public function setVariable($name, $var);
public function getHtml($template);
}


The error is:Code: Parse error: parse error, unexpected T_STRING in /path/test.php on line 1

What am I doing wrong? If it matters, my server is running php version 4.3.11.

No comments posted yet

Your Answer:

Login to answer
269 Like 28 Dislike
Previous forums Next forums
Other forums

Echoing ASCII code
I have a php page that splits a string into chars and then echoes the ASCII code for each char. I'm

Request-URI Too Large
I have created a simple submit form for a mysql database that puts a piece of code into database.<

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

I need an iframe that calls up a different page according to the date
hi

I don't know any php (only html) and I urgently need to do the following:

I need a

Get keys and values from an array
Hellow,

I have an array $Data with keys and values. With a foreach I can display all the valu

Display thumbnails as square while retaining aspect ratio
I am trying to figure out a way to make an image display as a square, for example 80x80 pixels, when

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

Syntax Help
Code:


im having trouble with that code snipped
Parse error: syntax error, unexpec

with clause
hi all, i have a big query that usually access the same table more than once. for example, i have s

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash