Forums

Can I insert long value into an array with width of 3 ? (4 posts)

  1. imjscn
    Member
    Posted 1 year ago #

    one of my plugins generate a database table. In its code, it uses a array with width of 3.
    I want to save a long text into the table. So, I want to know what does 3 mean? 30%? or 3 charactor?

  2. Which plugin? One you wrote or...?

  3. imjscn
    Member
    Posted 1 year ago #

    @Ipstenu ,
    in EventPress, this array is to store the meta data

    Array(
    	Array(
    		'width' => 4,
    		'id' => 'start',
    		'contents' => Array(&$this, 'metabox_start')
    	     ),
    	Array(
    		'width' => 6,
    		'id' => 'end',
    		'contents' => Array(&$this, 'metabox_end')
    		),
    	),

    the value is saved in post meta.
    I want to add some other keys in this array.
    Maybe the width is not for the post meta table, instead, the width might mean to be used in displaying html in front end. I don't know.

  4. imjscn
    Member
    Posted 1 year ago #

    by the way, I don't understand "$this" in this line:
    'contents' => Array(&$this, 'metabox_end')
    This Array is within a function, "$this" here means this function or the component that this function belongs to?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags