Ok, I am using PHP to parse XML file and to display it;s context to HTML. Here is the code. Sample text is - Don't Give UP!
$xml = simplexml_load_file('data/quotes.xml');
foreach ($xml as $quote) {
$text = $quote->text;
echo '<div class="itemWrapper">'.
'<div class="quoteHolder">'.
'<p class="quote">'.$text.'</p>'.
'</div>'.
'<form class="selectionButtons">'.
"<input type='hidden' value='$text' name='quote'>".
'<input class="submitButton" type="button" value="create your design">'.
'</form>'.
'</div>';
}
So, when I use $text variable in paragraph it display's correctly, But when I pass it to the form's hidden field I only get: Don (so it stops right before that single quote) It happens with every text that has quotes. Why is that and what is wrong here?