I'm having a problem with my explode function in PHP.
I'm pulling a string from the database as follows:
column_name
0,2000,0,3000,1000,7000,1000,0,0,0
After pulling this into an object called $recordset i'm using the explode function to make an array out of it... as follows:
$array = explode(",",$recordset->column_name)
But some how, the array is not as what i would expect...
This is what i get when i echo the array:
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 3000
[4] => 7000
[5] => 2000
[6] => 1000
[7] => 1000
[8] => 0
[9] => 0
)
As you can see, i'm not getting the values as i should... However, if my string from the database is short, say:
1000,0,1200,0
The above logic works fine..
I'm not sure how to debug or solve this problem..
Please, help?