2016-09-27 20 views
-1

は、私はすべてのPHP変数は、それぞれの値に変換されるように私はPHPの変数には、この文字列全体を置くことができますどのようにHTMLタグとphp変数を含む文字列をphp文字列変数に取り込む方法は?

Hi, <br><br> 
Someone has shared a <?php echo $job_type ?> with you through <?php echo CHtml::link(Yii::params['Data_Port'], Yii::app()->getBaseUrl(true)); ?>.<br><br> 
Title: <?php echo $job_title;?><br><br> 
<?php echo CHtml::link("View"." ".ucfirst($job_type)." "."Details", $job_link); ?> 

などの文字列があると?

答えて

2

あなたは

<?php 
$str=''; 
$str.="Hi, <br><br> Someone has shared a "; 
$str.=$job_type; 
$str."with you through"; 
$str.=CHtml::link(Yii::params['Data_Ports'], Yii::app()->getBaseUrl(true)); 
$str.="<br><br>"; 
$str.="Title:"; 
$str.=CHtml::link("View"." ".ucfirst($job_type)." "."Details", $job_link); 
?> 
0

あなたは、その文字列をデコードする文字列とhtml_entity_decodeを変換するhtmlentitiesを使用することができ、これを試してみてください。これがあなたを助けることを願っています。

関連する問題