title: Serialize or json in PHP?
body: <p>So I need to encode an array in PHP and store it in plain text in MySQL database, my question is should I use serialize() or json_encode()? What are the advantages and disadvantages of each of them?</p>
  
  <p>I think either of them would do in this situation. But which one would you prefer and why? If it is for something other than an array?</p>