Setting form value with a variable

I’ve tried:

value=“.$margin3.”
value=“$margin3”
value=$margin3

,but no joy.

I must be dancing around the answer. What’s the script to assign a form value with a variable please?

Need just a bit more context than that. Where is this being executed? Inside an echo? Inside or outside of a PHP block?

That worked. Doooo!

value=“‘.$margin3.’”

Thanks for your help during a senior moment StarLion.

Niche

HTML input value?


<input type="text" value="<?= $margin3; ?>" />

I don’t understand that notation. What does it mean?

You won’t need to do that as it looks like you’re echoing the HTML, but it’s that same as:


<?php echo $margin3; ?>

Gotch ya.

Thanks,

Niche