title: How to handle slashes in strings in arrays for serialize function in php?
body: <p>I think the title says it, as well...but of course some more explanation</p>
  
  <p>assume i have an array containig strings. if one of my strings contains slashes, like <code>"red/blue/green"</code> there will be troubles when i use the serialize/unserialize function of php and storing/loading the value in a session-variable.</p>
  
  <p>if you have nested large arrays you have to think about escaping every single value, especially if the dimension of the array is not clear. <strong>i don't want to run a recursive algorithm over my nested huge arrays for performance reason.</strong></p>
  
  <p>so how can i get that fixed, anyway?</p>
  
  <p>thanks to all helpers ;-)</p>