I'm trying to write some code that will build a form more or less automatically. I start by defining a generic <input> tag like this:
$x = "<input type='text' name='$name' value='$value' />"
Later on I have code that sets the $name and $value variables like this:
$name="ClientID";
$value = 12324;
The idea is to build the HTML <input> tag using the values of the variables so that I can echo like this:
echo $x;
and get something like this:
<input type='text' name='ClientID' value='1234' />
I've tried about every double quote, single quote, curly bracket variation I can think of but no luck. Usually I just get:
<input type='text' name='' value='' />
Any ideas?