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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.