CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Aug 2008
    Posts
    114

    Question Converting PHP serializer string to VB.net

    Hey all i am trying to find (or come up) with some code that would allow me to decode the following string:

    Code:
    a:1:{i:0;a:9:{s:12:"model_number";s:8:"TTN037-7";s:5:"price";s:4:"2935";s:10:"unit_price";d:2405.32000000000016370904631912708282470703125;s:8:"id_price";d:2935;s:9:"sales_tax";d:223.68000000000000682121026329696178436279296875;s:5:"sales";d:2380.32000000000016370904631912708282470703125;s:7:"service";s:2:"25";s:7:"freight";s:3:"306";s:13:"comm_category";s:3:"X24";}}
    It was made via PHP serializer. Using a PHP Unserializer online converter the above string comes out to be:

    Code:
    Array
    (
    [0] => Array
    (
    [model_number] => TTN037-7
    [price] => 2935
    [unit_price] => 2405.32
    [id_price] => 2935
    [sales_tax] => 223.68
    [sales] => 2380.32
    [service] => 25
    [freight] => 306
    [comm_category] => X24
    )
    
    )
    Now i've been up and down on google to try to find a function or whatnot for VB.net to take care of this conversion but i have yet to find any!

    It would be really great if someone could help me decode this using VB.net!

    Thanks!
    Last edited by StealthRT; August 15th, 2012 at 10:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured