Jump to content

[SOLVED] Creating Dynamic Objects


jst4fun

Recommended Posts

Hi,

I am currently working on a site. This site is developed using qcodo framework. I got a page in which 5 rows with 5 text box in each rows are displayed. In qcodo each textbox is an object of a class called QTextBox. I wanted to add additional 5 rows on user reaching the last textbox of the previous 5 rows. This is an on going process until the user clicks on to the save button. I tried to make the objects into an array using the following code

<?php

public $txtQtn = array();

 

$this->txtQtn[0] = new QTextBox($this);

$this->txtQtn[0]->Width = "50";

$this->txtQtn[0]->ActionParameter = "1";   

?>

When i tried to exicute this script I got firefox download manager asking me whether I wanted to download this script or not. So this means i am wrong somewhere. So my question is how can I create my objects dynamically? Hope someone would help me.  Thank you

Link to comment
https://forums.phpfreaks.com/topic/43401-solved-creating-dynamic-objects/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.