jeff5656 Posted July 6, 2013 Share Posted July 6, 2013 (edited) I want to parse the following POSTed variable (notice that each element in this variable is separated by a semicolon and a space) $variable = "201px; 169px; 110px; 114px; 142px; 43px; 112px; " so that $a="201px" $b="169px" etc a) how do i do that b) how do I do that if the number of elements to parse is NOT known? If anyone knows the solution to a) but no tb) thats ok - I can try to figure out b once I underatand how to do a! Edited July 6, 2013 by jeff5656 Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 6, 2013 Share Posted July 6, 2013 explode() I would exlode just on the semi-colon and then use trim() to remove any spaces. Quote Link to comment Share on other sites More sharing options...
litebearer Posted July 6, 2013 Share Posted July 6, 2013 (edited) hint: explode typing too slow LOL Edited July 6, 2013 by litebearer Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.