Jump to content

[SOLVED] String Manipulation


bsamson

Recommended Posts

Hello.

 

If I have a string in the this format:

$models = "1603, 1802, 1527, 1782, 1817, 1598, 1666, 1781, 1970, 1939, 1889, 1762, 1761, 1885, 1821, 1827, 1857, 1921, 1942, 1756, 1930, 1414, 1856, 1920";

 

Now, an interesting thing about $models is that sometimes there will be only 1 model (ie: $models="1234"), and as you can see from above example it sometimes contains many ... but the constant is that it will always be in that format.

 

Is there a quick function/script to store each of those numbers (ie: 1603) into an array? Any help would be GREATLY appreciated! Thanks!

Link to comment
https://forums.phpfreaks.com/topic/182304-solved-string-manipulation/
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.