title: How to store php variable content in HTML "id"
body: <p>I have 3 variables in PHP, message_id, message_title, message_content. I store the content of those variables inside HTML 'id' so that I can use them later with jQuery. </p>
  
  <p>Like this: </p>
  
  <p>Varibles: </p>
  
  <pre><code>$id_variable = $rows['id_mensagem'];
  $message_title_edit = $rows['title_text'];
  $message_content_edit = $rows['txt_mensagem'];
  </code></pre>
  
  <p>Here's the "ids" part. </p>
  
  <pre><code> echo '&lt;a href="#" class="edit_message" id='.$id_variable.' message='.$message_content_edit.' titulo ='.$message_title_edit .' data-toggle="modal" data-target="#open_modal_edit"&gt;Detalhes &lt;/a&gt;';
  </code></pre>
  
  <p>How you can see, <code>id=$id_variable</code>, <code>message = $message_content_edit</code>, <code>titulo = $message_title_edit</code></p>
  
  <p>Where's my problem:</p>
  
  <p>The Id message &amp; titulo store data inside untill first blank space.</p>
  
  <p>Like this: </p>
  
  <pre><code>$id_variable = '10';
  $message_title_edit = 'Just some title';
  $message_content_edit = 'Some content';
  </code></pre>
  
  <p>echo/Output:</p>
  
  <pre><code>echo '&lt;a href="#" class="edit_message" id='10' message='Just' titulo ='Some' data-toggle="modal" data-target="#open_modal_edit"&gt;Detalhes &lt;/a&gt;';
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/iR7XW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iR7XW.png" alt="Image of what&#39;s happening"></a></p>