convert string with array structure back to array in php -
i have <input type="text" name="info">
value this:
array() { [name]=> 'tien' [sex]=> 'male' [address]=> 'abc' [code]=> '888' }
i submit input site (note input value string), want convert value string array array("name"=>"tien", "sex"=>"male", "address"=>"abc", "code"=>888)
. possible convert string array. if yes please me solve this. , sorry because bad english
what you're asking serialisation, i.e. expressing arbitrarily complex data structure in lowest common denominator text. if choose serialisation format can serialised , unserialised, trivial. i'd suggest use either serialize
, unserialise
or json_encode
, json_decode
. whatever format came there not unserialisable.
Comments
Post a Comment