Jump to content

Array help


pbalsamo

Recommended Posts

Please help

I am stuck on how to click checkbox and put area code in text field

 

<?php $array1 = array("(516)","(631)","(718)"); ?>

<td><input name="Phone" type="text" value="<?php echo $array1; ?>" size="15" />

<input name="RadioGroup1" type="radio" id="RadioGroup1_0" onclick="<?php echo $array[0]; ?>" value="" checked="checked" />

<label>(516)</label>

<input name="RadioGroup1" type="radio" id="RadioGroup1_1" onclick="<?php echo $array[1]; ?>" value="" />

<label>(631)</label>

<input name="RadioGroup1" type="radio" id="RadioGroup1_2" onclick="<?php echo $array[2]; ?>" value="" />

<label>(718)</label><br />

<label>(###)###-####</label>

</td>

Link to comment
https://forums.phpfreaks.com/topic/130263-array-help/
Share on other sites

As above... You can't onclick="<?php echo bla bla ?>"

 

onclick is reserved for javascript functions or such like.....

 

Also your trying to echo an array... On a normal config this will not work... you'll need to manipulate the array with something like foreach() or print_r().

 

Explain exactly what it is your trying to accomplish!?

Link to comment
https://forums.phpfreaks.com/topic/130263-array-help/#findComment-676492
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.