How to concatenate string and javascript variable inside jquery selector
<p>How do I concatenate a string with a javascript variable inside a jquery selector?
If I execute the code below. All the other form elements gets hidden.</p>

<pre><code>var inputatr = $('input[type=text]').attr(); //button
$('input[value=string ' +  inputatr +']').hide(); //textbox
</code></pre>

<p><strong>Update</strong></p>

<pre><code>&lt;?php for($x=0; $x&lt;4; $x++){ ?&gt;

&lt;input type="text" id="&lt;?php echo $x; ?&gt;" name="&lt;?php echo $x; ?&gt;" value="text&lt;?php echo $x; ?&gt;"/&gt;
&lt;input type="button" name="show&lt;?php echo $x; ?&gt;" value="string&lt;?php echo $x; ?&gt;"/&gt;&lt;/li&gt;

&lt;?php } ?&gt;
</code></pre>
