html - Display PHP in Textarea -
i'm trying display php variable in text area outputs in between text area tags
here's code:
echo "allergens contained " .'<textarea rows="4" name="allergens_contains"> <?php echo $contains; ?></textarea>';
in text area on webpage i'm getting is: <?php echo $contains; ?>
you should concatenate strings , variables via:
<?php echo 'this text ' . $php_variable . ' more text';
or
<?php echo "this text " . $php_variable . " more text";
or
<?php echo "this text $php_variable more text";
or
<?php echo "this text {$php_variable} more text";
Comments
Post a Comment