paulman888888 Posted October 3, 2009 Share Posted October 3, 2009 Hi; Me again! Once again i am having issues with splitting up strings. I would like to know if there is a site (NOT PHP MANEUL! I HAVE TRYED READING THAT IT'S TO LONG!) that can teach me how to spilt up strings. This is what i have been trying (and failling again) to do. I am trying to get this string (which is generated by javascript) into an PHP array! a:3:{s:1:"0";a:2:{s:1:"0";s:10:"Purchasing";s:1:"1";i:1;}s:1:"1";a:2:{s:1:"0";s:15:"Human resources";s:1:"1";i:2;}s:1:"2";a:2:{s:1:"0";s:27:"Manufacturing or production";s:1:"1";i:3;}s:1:"3";a:2:{s:1:"0";s:9:"Marketing";s:1:"1";i:4;}s:1:"4";a:2:{s:1:"0";s:12:"Distribution";s:1:"1";i:5;}s:1:"5";a:2:{s:1:"0";s:5:"Sales";s:1:"1";i:6;}s:1:"6";a:2:{s:1:"0";s:24:"Research and development";s:1:"1";i:7;}s:1:"7";a:2:{s:1:"0";s:9:"Personnel";s:1:"1";i:8;}s:1:"8";a:2:{s:1:"0";s:17:"Customer services";s:1:"1";i:9;}s:1:"9";a:2:{s:1:"0";s:11:"Advertising";s:1:"1";i:10;}} Each {} is an array. I couldn't use the simple way of useing commas as i wouldnt no when the next sub array started and ended! Thank you all Paul Quote Link to comment Share on other sites More sharing options...
Mchl Posted October 3, 2009 Share Posted October 3, 2009 Try unserialize 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.