cemaykan
asked on
Editing values on a simple array
Hi everyone ;
This one is a annoying situation
I have a array, that gets feed from a web form.
like this : "2+3+4/20"
it puts in the first element of the array
but i want it to be like this : $a[0] = "2" , $a[1]="+".... $a[6]="20"
Now, note that the last elemet is a two digit number, so if you use this command :
$kstring = preg_split("//", $input);
it will take as a "2" and "0"
you have to find a way arround this ...
Goodluck guys, and thanks alot!!!!
This one is a annoying situation
I have a array, that gets feed from a web form.
like this : "2+3+4/20"
it puts in the first element of the array
but i want it to be like this : $a[0] = "2" , $a[1]="+".... $a[6]="20"
Now, note that the last elemet is a two digit number, so if you use this command :
$kstring = preg_split("//", $input);
it will take as a "2" and "0"
you have to find a way arround this ...
Goodluck guys, and thanks alot!!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: snoyes_jw {http:#13711559}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
Huji
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: snoyes_jw {http:#13711559}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
Huji
EE Cleanup Volunteer
ASKER
the only operands used are (*, +, /,-) ... The rest are integer numbers...