Jump to content

Display PHP Array values into a Textbox


M_Marculescu

Recommended Posts

I have a long array and I want to display its values in a textbox in PHP.

if($platform !=0) {
$mask = get_masks($platform);
$options =array() ;
$temp= array();
$options[0] = "Please select";
foreach ($masks as $mask_){
$options[$mask_[0]] = $mask_[1];
array_push( $temp, $mask_[0] );
print_r($mask);
}

$form->addElement(new Element\Textbox("Masks :", "mask", array("onchange" => "this.form.submsubmit()", "value" => $mask)));

 

 

I know I can do this with HTML,but I must use PHP. I used : "value" => implode(" ",$mask),but instead of the array it appears ArrayArray.

 

Here is how the output should look:

 Array ( [0] => Array ( [iD] => [Platform_ID] => [M_01] => [M_02] => [M_03] => [M_04] => [M_05] => [M_06] => [M_07] => [M_08] => [M_09] => [M_10] => [M_11] => [M_12] => [M_13] => [M_14] => [M_15] => [M_16] => [M_17] => [M_18] => [M_19] => [M_20] => [M_21] => [M_22] => [M_23] => [M_24] => [M_25] => [M_26] => [M_27] => [M_28] => [M_29] => [M_30] => [M_31] => [M_32] => [M_33] => [M_34] => [M_35] => [M_36] => [M_37] => [M_38] => [M_39] => [M_40] => [M_41] => [M_42] => [M_43] => [M_44] => [M_45] => [M_46] => [M_47] => [M_48] => [M_49] => [M_50] => [M_51] => [M_52] => [M_53] => [M_54] => [M_55] => [M_56] => [M_57] => [M_58] => [M_59] => [M_60] => [M_61] => [M_62] => [M_63] => [M_64] => [M_65] => [M_66] => [M_67] => [M_68] => [M_69] => [M_70] => [M_71] => [M_72] => [M_73] => [M_74] => [M_75] => [M_76] => [M_77] => [M_78] => [M_79] => [M_80] => [M_81] => [M_82] => [M_83] => [M_84] => [M_85] => [M_86] => [M_87] => [M_88] => [M_89] => [M_90] => [M_91] => [M_92] => [M_93] => [M_94] => [M_95] => [M_96] => [T_01] => [T_02] => [T_03] => [T_04] => [T_05] => [T_06] => [T_07] => [T_08] => [T_09] => [T_10] => [T_11] => [T_12] => [T_13] => [T_14] => [T_15] => [T_16] => [T_17] => [T_18] => [T_19] => [T_20] => [T_21] => [T_22] => [T_23] => [T_24] => [Z_01] => [Z_02] => [Z_03] => [Z_04] => [Z_05] => [Z_06] => [T_max] => [M_max] => [Z_max] => [changed_on] => [changed_by] => ) [1] => Array ( [0] => 20 [1] => 10 [2] => 1 [3] => [4] => [5] => [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => [23] => [24] => [25] => [26] => [27] => [28] => [29] => [30] => [31] => [32] => [33] => [34] => [35] => [36] => [37] => [38] => [39] => [40] => [41] => [42] => [43] => [44] => [45] => [46] => [47] => [48] => [49] => [50] => [51] => [52] => [53] => [54] => [55] => [56] => [57] => [58] => [59] => [60] => [61] => [62] => [63] => [64] => [65] => [66] => [67] => [68] => [69] => [70] => [71] => [72] => [73] => [74] => [75] => [76] => [77] => [78] => [79] => [80] => [81] => [82] => [83] => [84] => [85] => [86] => [87] => [88] => [89] => [90] => [91] => [92] => [93] => [94] => [95] => [96] => [97] => [98] => 1 [99] => [100] => [101] => [102] => [103] => [104] => [105] => [106] => [107] => [108] => [109] => [110] => [111] => [112] => [113] => [114] => [115] => [116] => [117] => [118] => [119] => [120] => [121] => [122] => 1 [123] => [124] => [125] => [126] => [127] => [128] => 24 [129] => 96 [130] => 6 [131] => 2015-05-26 16:09:31.543 [132] => 1 ) )

 

 

I will order it as soon as I get it into the textbox.
 

Link to comment
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.