Problem while printing Hindi text through a user defined function!
I how two php files one is main.php and second is functions.php. If I print below line in main.php, its working fine.
print "देश विदेश";
but my reqirment is to call a function from functions.php in main.php that should do the same:
Mian.php
require_once('functions.php');
print func_headline();
functions.php
function func_headline()
{
//print html_entity_decode("देश विदेश", ENT_NOQUOTES,'UTF-8');
print "देश विदेश";
//utf8_encode("<a title='देश विदेश' href='#'><span>'दे开发者_如何学Pythonश विदेश'</span></a>");
}
why it doesnot works??
You need to just call the function in main.php
. Change statement
print func_headline();
to
func_headline();
精彩评论