Jump to content

Where to learn about PHP and string splitting?


paulman888888

Recommended Posts

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

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.