FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Problem with Populating Persian(Arabic) Number in PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Problem with Populating Persian(Arabic) Number in PHP [message #175853] Mon, 31 October 2011 07:25 Go to previous message
beh is currently offline  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.
[Message index]
 
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: json and special chars
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 12 19:43:08 GMT 2024

Total time taken to generate the page: 0.06204 seconds