i have an array element that looks like this:
$data['0']=12.34.8888
Now i would like to splitt this element into:
$newdata1['0']=12.34.
$newdata2['0']=8888
Is that possible?
possible to split array element?
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Yes it is possible using explode(), but can you expect the data to be in a certain format?
In your example you have x.x.x, and you want to split the first two from the third, so is there always going to be 2 decimals?
In your example you have x.x.x, and you want to split the first two from the third, so is there always going to be 2 decimals?