title: An escaped apostrophe in associative array value
body: <p>I have an associative array that is built dynamically from a MySQL table like so:</p>
  
  <pre><code>array(['p.id'] =&gt; 3, ['p.fname'] =&gt; 'Bill', ['p.lname'] =&gt; 'O\'Reilly')
  </code></pre>
  
  <p>This is a large array and was built this way for reasons that are too long to go into here. The problem, as you can see is that when we attempt to access the value of ['p.lname'] we get "O\"</p>
  
  <p>Anyone have any ideas on how to get around this without modifying the way the array is built? I am currently stripping the slashes and internal apostrophes as a work around, but would prefer to leave the apostrophes in place and just strip the slashes.</p>
  
  <p>This is complicated by the fact that the output goes into a form input like so:</p>
  
  <pre><code>$field = "&lt;input type='text' name='$input_unique_id' style='width:$width;' value='$array_value' /&gt;";
  </code></pre>