Jump to content

Help with array - print 'displayTemplate('.$templateArray[.'templateList.value'.


simbawoomba

Recommended Posts

Hi  i have this snippet of code

basically what i am doing is displaying  a piece of text in a text area depending on what is selected from a list box, i have it working if i change the numbers in the code, although i obviously need it to work dynamically, this is the peice of code that i need help with:

<select  size="10" id="templateList" name="templateList" onchange="<?php

print 'displayTemplate('.$templateArray[1][1].',MessageTemplate)';

?>

">;

i want the first number in the array to be equal to templateList.value, i have tried the following

print 'displayTemplate('.$templateArray[.'templateList.value'.][1].',MessageTemplate)';

this did not work and caused errors, could someone please help me asap.

i am fairly new to psp and usually work in c++

Thanking you in advanced
[img][/img]

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.