Modify Java code from PHP Code

Modify Java code from PHP Code

i want to covert this php code int java/JSP.

if (isset($_POST['orders'])) {

$orders = explode('&', $_POST['orders']);
$array = array();

foreach($orders as $item) {
    $item = explode('=', $item);
    $item = explode('_', $item[1]);
    $array[] = $item[1];
}

} I tried like this (see below JSP code) ... but this is not giving me the exact result as the above PHP code is giving. So please help me to convert it into Java.

if (request.getParameter("orders") != null) { String item = request.getParameter("orders"); System.out.println("oRDERS...."+item);

String[] arr = item.split("\\=");
item.split("\\_");

System.out.println("Length of Array is :" + arr.length);

for (int i = 0; i < arr.length; i++) {
     System.out.println("array " + i + ":" + arr[i]);
}

} else { System.out.println("NOT SET"); }

View Answers

April 2, 2012 at 11:43 AM

Ads









Related Tutorials/Questions & Answers:
Please help me to modify my java code from php code
Modify Java code from PHP Code  i want to covert this php code int java/JSP. if (isset($_POST['orders'])) { $orders = explode('&', $_POST... the exact result as the above PHP code is giving. So please help me to convert
Please help me to modify my java code from php code
Please help me to modify my java code from php code  i want to covert this php code int java/JSP . if (isset($_POST['orders'])) { $orders...) ... but this is not giving me the exact result as the above PHP code is giving. So please
Advertisements
php login and logout code
php login and logout code  Hi, Can anyone share there code for creating a user login and logout page in PHP?or any useful tutorial that can help to create a login and logout application in PHP.. Thanks in Advance
email search code in php
email search code in php  email search with multiple option in php
java code Translitrator from english to hindi
java code Translitrator from english to hindi  I need help to develop a java translitrator application that transforms english to hindi
download code from database
download code from database  how to download files from database
Line From code
Line From code  document.getElementById("demo").innerHTML=Date(); Please explain each and every word in this line
in php What the code is to be written for Authentication with Session Control
in php What the code is to be written for Authentication with Session Control  in php What the code is to be written for Authentication with Session Control
How to populate text fields using php code?
How to populate text fields using php code?  How could I use php to populate text fields by selecting a name of a business from dropdown list? Those..., post code in php. Also, the user would also need to edit the information
Sql Examples using php code
Here is the many examples. In this tutorial we discuss many examples of sql statements using php code
code
code   hi I need help in creating a java code that reminds user on a particular date about their festival. i have no clue of how to do it.. am looking forward to seek help from you
want the code for calender in php+htmal page
want the code for calender in php+htmal page   i have to select a calendra for some textbox in an table
code
code    how to write this in java
java code
java code  Create Book having following attributes: Book ID, Title, Author and Price. Create Periodical which has the following additional attributes: Period (weekly, monthly etc...) .Add a behavior to modify the Price
Java code
Java code  Create Book having following attributes: Book ID, Title...: Period (weekly, monthly etc...) .Add a behavior to modify the Price... Friend, Try the following code: import java.util.*; class Book{ int id
PLZ HELP ME. i need php code.
PLZ HELP ME. i need php code.   I want php code for bellow OUTPUT. output is just example but it must be letters only. abc bcd efg jku rgt azs hje qqc wws adt
Code
Code  code for connecting c lang to database
code
code  code for android sample program
code
code  please provide code for custom tags.by using currdate tag we need to get current date?please give me code
code
the correct code for a program.The output of the program is listed below...: {Block 5} ADDRESS-3: {San Juan} POST CODE:{6745} ENTER CODE (XX TO stop) CODE:{FF1} QUANTITY:{2} CODE:{TR4} QUANTITY:{1} CODE:XX INVOICE FOR YOUR ORDER Harry
php brute force code.. hlp plz .....
php brute force code.. hlp plz .....  hello friends, from... //////////////////////////////////// Started PHP Code ////////////////////// set_time_limit(0..., ''); //////////////////////////////////// Ended PHP Code ////////////////////// now i
sql php code
sql php code       SQL PHP code executes the statement using the mysql_query ( ) function... with Example The Tutorial illustrate an example from 'SQL PHP'. To understand
code
code to create the RMI client on the local machine: import java.rmi.*; public... : "+e); } } } However, when the preceding code is executed it results... the correct code
code
code  i have four textboxes.whenever i click on up,down,left or down arrows then the cursor move to another textbox based on the key pressed.i want code for this in javascript
code
line of code to print the amount he should be paid as allowance
code
code  < comp xlink:type="new" xlink:actuate="onload"/> how to write this in java
Code
Code  how to print this?? with the use of only JSP....... 1 23 456 78910   Here is the jsp number pattern example: 1 2 3 4 5 6 7 8 9 10 <%@page language="java"%> <% int k = 1; for(int i=1; i<= 4 ;i
JAVA code For
JAVA code For   JAVA code For "Traffic signals Identification for vehicles
JAVA CODE
JAVA CODE  JAVA SOURCE CODE TO BLOCK A PARTICULAR WEB SITES(SOCIAL WEB SITE
java code
java code  write a java code to convert hindi to english using arrays
sending verification code to mobile using php
sending verification code to mobile using php  I had created..., verification code has to send to their respective mobiles.. so can u tell the process and how to implement this using php

Ads