echo 存储在 PHP 脚本数组中的印地语语言单词
echo HINDI language word stored in an array in PHP script
我正在尝试回显存储在数组中的印地文文字。当我使用 print_r()
时会显示输出,但当我使用 echo
时不会显示。代码如下。我需要做哪些改变?
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<?php
$base_arr=array("सूर्योदय","कँगन","ख गोल","गँगरी","घंटाघर","चंचल","छूईमुई","जिज्ञासा","झंकार","टिकट","ठंढाई","डांटना","तौलिया","थकान","दंगल","धुँधला","निंदनीय","पँखुडी","फाइल","बाँटना","भँवर","मंजीरा","यंत्रक","रुकावट","लेकिन","वंचित","शांतनु","षडयंत्र","सँजोग","हिंदुस्तान","अजय","आँकड़े","इंकार","ईखराज","उँगली","ऊगना","एजेंसी","ऐंठना","ओवन","औलाद");
shuffle($base_arr);
print_r($base_arr);
?>
<table border=”1px” bordercolor="#F660AB" bgcolor="#FCDFFF" width=30% height=50% align=center>
<?php
for($i=0;$i<6;$i++)
{
echo"<tr>";
for($j=0;$j<6;$j++)
{
?>
<td> <center><h5><?php echo $base_arr[$i][$j]; ?> </h5></center><
<?php
}
echo"</tr>";
}
?>
您将一维数组用作二维数组
试试这个:-
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<?php
$base_arr=array("सूर्योदय","कँगन","ख गोल","गँगरी","घंटाघर","चंचल","छूईमुई","जिज्ञासा","झंकार","टिकट","ठंढाई","डांटना","तौलिया","थकान","दंगल","धुँधला","निंदनीय","पँखुडी","फाइल","बाँटना","भँवर","मंजीरा","यंत्रक","रुकावट","लेकिन","वंचित","शांतनु","षडयंत्र","सँजोग","हिंदुस्तान","अजय","आँकड़े","इंकार","ईखराज","उँगली","ऊगना","एजेंसी","ऐंठना","ओवन","औलाद");
shuffle($base_arr);
print_r($base_arr);
?>
<table border=”1px” bordercolor="#F660AB" bgcolor="#FCDFFF" width=30% height=50% align=center>
<?php
$x =0;
for($i=0;$i<6;$i++)
{
echo"<tr>";
for($j=0;$j<6;$j++)
{
?>
<td> <center><h5><?php echo $base_arr[$x]; ?> </h5></center>
<?php
$x++;
}
echo"</tr>";
}
?>
我正在尝试回显存储在数组中的印地文文字。当我使用 print_r()
时会显示输出,但当我使用 echo
时不会显示。代码如下。我需要做哪些改变?
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<?php
$base_arr=array("सूर्योदय","कँगन","ख गोल","गँगरी","घंटाघर","चंचल","छूईमुई","जिज्ञासा","झंकार","टिकट","ठंढाई","डांटना","तौलिया","थकान","दंगल","धुँधला","निंदनीय","पँखुडी","फाइल","बाँटना","भँवर","मंजीरा","यंत्रक","रुकावट","लेकिन","वंचित","शांतनु","षडयंत्र","सँजोग","हिंदुस्तान","अजय","आँकड़े","इंकार","ईखराज","उँगली","ऊगना","एजेंसी","ऐंठना","ओवन","औलाद");
shuffle($base_arr);
print_r($base_arr);
?>
<table border=”1px” bordercolor="#F660AB" bgcolor="#FCDFFF" width=30% height=50% align=center>
<?php
for($i=0;$i<6;$i++)
{
echo"<tr>";
for($j=0;$j<6;$j++)
{
?>
<td> <center><h5><?php echo $base_arr[$i][$j]; ?> </h5></center><
<?php
}
echo"</tr>";
}
?>
您将一维数组用作二维数组
试试这个:-
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<?php
$base_arr=array("सूर्योदय","कँगन","ख गोल","गँगरी","घंटाघर","चंचल","छूईमुई","जिज्ञासा","झंकार","टिकट","ठंढाई","डांटना","तौलिया","थकान","दंगल","धुँधला","निंदनीय","पँखुडी","फाइल","बाँटना","भँवर","मंजीरा","यंत्रक","रुकावट","लेकिन","वंचित","शांतनु","षडयंत्र","सँजोग","हिंदुस्तान","अजय","आँकड़े","इंकार","ईखराज","उँगली","ऊगना","एजेंसी","ऐंठना","ओवन","औलाद");
shuffle($base_arr);
print_r($base_arr);
?>
<table border=”1px” bordercolor="#F660AB" bgcolor="#FCDFFF" width=30% height=50% align=center>
<?php
$x =0;
for($i=0;$i<6;$i++)
{
echo"<tr>";
for($j=0;$j<6;$j++)
{
?>
<td> <center><h5><?php echo $base_arr[$x]; ?> </h5></center>
<?php
$x++;
}
echo"</tr>";
}
?>