Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.