Jump to content

Putting text into an array


TheChief

Recommended Posts

Hey, I need help with putting the following into an array:

"1, 45, 4642, 567" (no quotes)

I need the above to be put into an array, so $array[0] = 1, $array[1]=45 and so on.  The above text can contain more than 4 numbers...so loop will need to be used, and the number of commas counted.  Id appreciate it if someone could help me, as I don't know anything mabout arrays.

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/32253-putting-text-into-an-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.