title: PHP to convert string to array
body: <p>This may be asked several times but my case is a bit different.</p>
  
  <p>Let me start from the beginning.</p>
  
  <pre><code>$ck_data = db_select('ckeditor_settings', 'cs')
             -&gt;fields('cs', array('settings'))
             -&gt;condition('name', 'Advanced', '=')
             -&gt;execute()
             -&gt;fetchAssoc();
  var_dump($ck_data);
  </code></pre>
  
  <p>Will give me...</p>
  
  <pre><code>array(1) {
    ["settings"]=&gt;
    string(2144) "a:33:{s:2:"ss";s:1:"2";s:7:"toolbar";s:606:"[
      ['Source'],
      ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker','Scayt'],
      ['Undo','Redo','Find','Replace','-','SelectAll'],
      ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],
      ['Maximize','ShowBlocks'],
      '/',
      ['Format'],
      ['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
      ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
      ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],
      ['Link','Unlink','Anchor','Linkit','LinkToNode','LinkToMenu']
  ]";s:6:"expand";s:1:"t";s:7:"default";s:1:"t";s:11:"show_toggle";s:1:"t";s:7:"uicolor";s:7:"default";s:12:"uicolor_user";s:7:"default";s:5:"width";s:4:"100%";s:4:"lang";s:2:"en";s:9:"auto_lang";s:1:"t";s:18:"language_direction";s:7:"default";s:15:"allowed_content";s:1:"t";s:19:"extraAllowedContent";s:0:"";s:10:"enter_mode";s:1:"p";s:16:"shift_enter_mode";s:2:"br";s:11:"font_format";s:35:"p;div;pre;address;h1;h2;h3;h4;h5;h6";s:17:"custom_formatting";s:1:"f";s:10:"formatting";a:1:{s:25:"custom_formatting_options";a:6:{s:6:"indent";s:6:"indent";s:15:"breakBeforeOpen";s:15:"breakBeforeOpen";s:14:"breakAfterOpen";s:14:"breakAfterOpen";s:15:"breakAfterClose";s:15:"breakAfterClose";s:16:"breakBeforeClose";i:0;s:10:"pre_indent";i:0;}}s:8:"css_mode";s:4:"none";s:8:"css_path";s:0:"";s:9:"css_style";s:5:"theme";s:11:"styles_path";s:0:"";s:11:"filebrowser";s:4:"none";s:17:"filebrowser_image";s:0:"";s:17:"filebrowser_flash";s:0:"";s:13:"UserFilesPath";s:5:"%b%f/";s:21:"UserFilesAbsolutePath";s:7:"%d%b%f/";s:21:"forcePasteAsPlainText";s:1:"t";s:13:"html_entities";s:1:"f";s:17:"scayt_autoStartup";s:1:"t";s:15:"theme_config_js";s:1:"f";s:7:"js_conf";s:0:"";s:11:"loadPlugins";a:1:{s:12:"drupalbreaks";a:5:{s:4:"name";s:12:"drupalbreaks";s:4:"desc";s:51:"Plugin for inserting Drupal teaser and page breaks.";s:4:"path";s:25:"%plugin_dir%drupalbreaks/";s:7:"buttons";a:1:{s:11:"DrupalBreak";a:2:{s:5:"label";s:11:"DrupalBreak";s:4:"icon";s:22:"images/drupalbreak.png";}}s:7:"default";s:1:"t";}}}"
  }
  </code></pre>
  
  <p>Now what I want is to get the value of <code>toolbar</code>.</p>
  
  <pre><code>$ck_settings = unserialize($ck_data['settings']);
  $ck_plugins = $ck_settings['toolbar'];
  var_dump($ck_plugins);
  </code></pre>
  
  <p>Will return...</p>
  
  <pre><code>string(606) "[
      ['Source'],
      ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker','Scayt'],
      ['Undo','Redo','Find','Replace','-','SelectAll'],
      ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],
      ['Maximize','ShowBlocks'],
      '/',
      ['Format'],
      ['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
      ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
      ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],
      ['Link','Unlink','Anchor','Linkit','LinkToNode','LinkToMenu']
  ]"
  </code></pre>
  
  <p>My question now is how can I convert <code>$ck_plugins</code> from string to array?</p>