Link to home
Start Free TrialLog in
Avatar of happpy36
happpy36

asked on

seperate numbers

Given somthing like: 859034, 482309, 7432890, 483902
Seperate it out as so:

$1 = "859034";
$2= "482309";

And so on ...
Avatar of Michael701
Michael701
Flag of United States of America image

can you use an array?

$data = "859034, 482309, 7432890, 483902"

$my_array = explode(", ",$data)
Avatar of happpy36
happpy36

ASKER

code that takes the first number in the list 859034, 482309, 7432890, 483902 and then stores it in the
variable, $number, and then loops back and stores the second number, 482309, in $number and so on
would work perfect for me.
Avatar of Jagar Mohammad
Are your numbers are as a string

$nums = "859034, 482309, 7432890, 483902"

or arrays

$nums = array(859034, 482309, 7432890, 483902);

ASKER CERTIFIED SOLUTION
Avatar of Jagar Mohammad
Jagar Mohammad
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial