Hi Ammar,
I used the first function, it has the same bug, the output using same string
was ( Wednesday, �٦٦0;٧ July �٦٦2;�٦٦0;�٦٦0;٨ ).
Ibrahim
On Mon, Apr 28, 2008 at 3:06 PM, Ammar Ibrahim <[EMAIL PROTECTED]>
wrote:
>
> This is complicated, and it uses regex, and it will be very slow. Why
> don't you use the code I sent? use the first function
>
> On Mon, Apr 28, 2008 at 3:01 PM, Ibrahim Y <[EMAIL PROTECTED]> wrote:
> > thanks all
> > oh, I got it, why the problem was only with number '6', I think I was
> sleepy
> > :P
> >
> > the code was written in that way for tracing issues, anyway, I fixed the
> > problem by adding '^' to the string before replacing it, check it below
> > please
> >
> > > function replaceNumbers($str){
> > > $str = preg_replace('/([0-9])/','^\1^',$str);
> > > $enNum = array("^0^", "^1^", "^2^", "^3^", "^4^", "^5^", "^6^",
> "^7^",
> > "^8^", "^9^");
> > > $arNum = array("٠", "١", "٢", "٣",
> > "٤", "٥", "٦", "٧", "٨", "٩");
> > > $str = str_replace($enNum, $arNum, $str);
> > > return $str;
> > > }
> > >
> > this will fix the problem, any comment?
> >
> >
> >
> > >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Jordan PHP Users Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/JoPHP
http://Jolug.org/
-~----------~----~----~----~------~----~------~--~---