I want to apply the html tags to the variable.
Code: echo '<strong>'.$message['sender'].' Sent'.'</strong>';
Output: <strong>The actual message Sent</strong>
Desired output: The actual message Sent
How can i apply the strong class to the $message variable?
Full context code::
<textarea name="message" disabled rows="6" style="resize:none;" placeholder="Loading...">
<?php
$messages = get_msg();
foreach($messages as $message){
echo '<strong>'.$message['sender'].' Sent'.'</strong>';
echo $message['message'].'<br/><br/>';
}
if(isset($_POST['send'])){
if(send_msg($_POST['sender'],$_POST['message'])){
echo 'Message Sent.';
}else{
echo 'Message failed to send';
}
}
?>
</textarea>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire