codeigniter - php escape characters, replacing string content with image source tag -
<?php echo anchor($this->lang->switch_uri($switchlang), "switch language" ?>
i want replace switch language message country flag.
how can escape characters , display img src inside string message
<?php echo anchor($this->lang->switch_uri($switchlang), "<img src='/somepath.jpg')"; ?>
thanks
try this:
<?php echo anchor($this->lang->switch_uri($switchlang), "<img src=\'/somepath.jpg\'"); ?>
- moved trailing double quotes inside bracket
- added escape slashes single quotes
Comments
Post a Comment