Click here to Skip to main content
16,012,168 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
$prebook=array(
            'sourceCity'=>$_POST['source'], 
            'destinationCity'=>$_POST['dest'],
            'doj'=>$_POST['doj'],
            'routeScheduleId'=>$_POST['routeid'],
             'boardingPoint'=>array(
                 'id'=>$id,
                 'location'=>$location,
                 'time'=>$time
             ),     
             'customerName'=>$_POST['fname'],
             'customerLastName'=>$_POST['lname'],
             'customerEmail'=>$_POST['email'],
             'customerPhone'=>$_POST['mobileno'],
             'emergencyPhNumber'=>$_POST['emc-number'],
             'customerAddress'=>$_POST['address'],
             'blockSeatPaxDetails'=>array(array(
                 'age'=>$_POST['age'][$key],
                 'name'=>$value,
                 'seatNbr'=>$_POST['seat-no'][$key],
                 'Sex'=>$_POST['gender'.$no],
                 'fare'=>$_POST['base-fare'][$key],
                 'totalFareWithTaxes'=>$_POST['amount'][$key],
                 'ladiesSeat'=>$ladies,
                 'lastName'=>$_POST['plname'][$key],
                 'mobile'=>$_POST['mobileno'],
                 'title'=>'Mrs',
                 'email'=>$_POST['email'],
                 'idType'=>$_POST['idtype'],
                 'idNumber'=>$_POST['id-number'],
                 'nameOnId'=>$value,
                 'primary'=>true,
                 'ac'=>$ac,
                 'sleeper'=>$sleeper
               )),
               'inventoryType'=>$_POST['invtype']             
          );
          $json=json_encode($prebook);


What I have tried:

php to vb.net convertion needed unable to convert
Posted
Updated 25-Nov-17 22:42pm
Comments
Richard MacCutchan 26-Nov-17 3:45am    
This is not a valid question. If you need this automatically converted then use Google to find a tool to do it. Otherwise learn VB.NET and rewrite it.

1 solution

Converting one language to another unrelated language is a bad idea: it does not generate "good code" in the destination language. It works well with VB and C# for example, because they are both .NET languages and use the same classes and structures (unless it's VB6 or early, in which case it doesn't work well).
PHP and VB are very different, and do not share anything.

Use the PHP code as a guide to specify the code you need in VB, and rewrite it as "natural" VB.NET code. Otherwise you will get a nasty, unmaintainable mess that is inconsistent with all your other code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900