Yii Framework Forum: Php Encoding Again In Yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Php Encoding Again In Yii please help in php decode /encode Rate Topic: -----

#1 User is offline   khajaamin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 03-December 12

Posted 10 January 2014 - 03:13 PM

hi , I am using this code to demo my problem. here i not found my output right


$theme->html=" hi i am {name}.";
$name= "khajaamin";
$content = str_replace('{name}','<?php echo $name; ?>',$theme->html);

if i echo $content;
i want output like here "hi i am khajaamin."
as khajaamin is variable into that please help me to get it done.

thank you
Khajaamin
0

#2 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,041
  • Joined: 16-February 11
  • Location:Japan

Posted 10 January 2014 - 05:08 PM

/* Moved from "General Discussion for Yii 1.1.x" to "General PHP Topics" */

Hi khajaamin,

$theme->html=" hi i am {name}.";
$name= "khajaamin";
$content = str_replace('{name}', $name, $theme->html);

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users