Concatenated many strings in PHP easily
<p>The following code is correct:</p>

<pre><code>$str = "INSERT INTO table ('".$val1."',"."'".$val2."'".","."'".$val3."'".","."'".$val4."')";
</code></pre>

<p>but the code below is incorrect:</p>

<pre><code>$str = "INSERT INTO table ('".$val1."',"."'".$val2."'".","."".$val3."'".","."'".$val4."')";
</code></pre>

<p>The above example is small but you can see that larger cases of the above are annoying to debug when one misses out a ' or a ".  Is there a better way of concatenating strings in PHP?  I want to have variables having single inverted commas on bother sides and I want the string to be made using double inverted commas.</p>

<p>There must be a better way.. I write a lot of queries from PHP that talk to an Oracle DB and I am constantly making mistakes with these strings!!</p>

<p>Thank you :).</p>
