dsoihsnz85757 2016-09-26 08:25
浏览 37

如何使用PHP从数据库中检索存储的post数组

I am storing form post data in MySQL data base in array format but when i fetch value its not array it is become string.

There are my fetch value:

Array ( [First_Name] => Rahul [Last_Name] => Singh [Street] => 210 Adhichini [City] => New Delhi [California_Automobile_Insurance_Quote] => California Automobile [ZIP_/_Postal_Code] => 110092 [E-Mail_Address] => rahulsingh4ut@gmail.com [Primary_Phone_Number] => 8470016156 [Alternate_Phone_Number] => 7503963073 [Date_of_Birth] => 25/05/1990 [Marital_Status] => Single [License_(State,_Number)] => DLI123 [Year] => 2012 [Make] => TVS [Model] => Apache 160 [VIN] => TVS123 [Cylinders] => CY000 [Do_you_rent_or_own_your_home?] => Rent [Do_you_currently_have_insurance?] => No [Current_Insurance_Provider] => No I. Prov [last_insurance] => No [Comprehensive_Deductible] => No [Collision_Deductible] => No [Bodily_Injury_Liability] => Bodily [Property_Damage_Liability] => Property Damage [Uninsured_Motorist_Bodily_Injury] => Uninsured [Uninsured_Motorist_Property_Damage] => Motorist Property Da [Underinsured_Motorist_-_Bodily_Injury_Limits] => Motorist - Bodily [Underinsured_Motorist_-_Property_Damage_Limits] => 05 [Medical_Pay_/_PIP] => 2016 [Towing] => Delhi [What_percentage_of_your_vehicles_total_use_time_is_driven_by_you?] => 45 [How_many_miles] => 15000 [accidents_or_minor_violations] => 5Yr ) 
  • 写回答

2条回答 默认 最新

  • dongxun5349 2016-09-26 08:31
    关注

    I think you post data into database using serialize function and retrive data using unserialize function. this is best

    $serialized_data = serialize(array('Math', 'Language', 'Science'));  
    echo  $serialized_data . '<br>';  
    
    评论

报告相同问题?

悬赏问题

  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致