i got a string in the following format:
a:5:{s:21:"securimage_code_value";s:4:"4l7z";s:6:"userID";s:2:"25";s:8:"username";s:6:"lupoxy";s:10:"angemeldet";s:4:"true";s:9:"user_role";s:3:"111";}
I need to parse the entries within the quotes, and get an Array like this:
$testarray[0]['key'] = "securimage_code_value";
$testarray[0]['value'] = "417z";
$testarray[1]['key'] = "userID";
$testarray[1]['value'] = "25";
and so on...
No I'm not trying to hack any sessions ;) I'm using Uploadify with Codeigniter, and I need to verify, that a user is allowed to upload, based on his session. I cannot use the Codeigniter session functions, since Uploadify creates its own session for the Upload-PHP-Script. So I pass the session_id as Uploadify scriptdata, and then I look for the session_id in the ci_sessions table, to parse the required session userdata myself.
Maybe somebody knows a better solution for this as well? ;)