php
$arr is a string type, and the single quotes are array syntax. How to convert this string to an array type?
<code>$arr = 'array("张三"=>"1988","李四"=>"1990","王五"=>"1989")';foreach($arr as $key => $value){ echo "姓名:".$key."-年份:".$value."<br>";}</code>
The data format in the string is wrong. Yours is saved in the form of key-value pairs, and it is also a string type, which is contradictory;