Home »
Imported messages »
comp.lang.php »
Problem with Populating Persian(Arabic) Number in PHP
Problem with Populating Persian(Arabic) Number in PHP [message #175853] |
Mon, 31 October 2011 07:25 |
beh
Messages: 1 Registered: October 2011
Karma:
|
Junior Member |
|
|
Hi everyone,
Can you please let me know why I am getting error on populating
Persian(Arabic)Numbers?!
I have saved the php file as "Uncode in UTF-8" format which can
display the dropdown list in a HTML correctly but when I want to
retrieve them in PHP I encountered with following errors
Errors:
(!) Notice: Use of undefined constant ١ - assumed '١' in C:\wamp\www
\PHPCode\Test.php on line 14
(!) Notice: Use of undefined constant ٣١ - assumed '٣١' in C:\wamp\www
\PHPCode\Test.php on line 14
* ١ = is a Persian number equal to 1
* ٣١ = is a Persian number equal to 31
Code:
<?php
$numberArray = array();
for ($i = ١; $i < ٣١; $i++)
{
$numberArray[] = $i;
}
for ($i = 0; $i < sizeof($numberArray); $i++) {
echo "$numberArray[$i]"."<br />";
}
?>
I really appreciate your time regarding this.
|
|
|
Goto Forum:
Current Time: Thu Nov 28 18:33:31 GMT 2024
Total time taken to generate the page: 0.04114 seconds