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









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
Pagination in PHP code - PHP
Pagination in PHP code  3.Pagination in PHP codeIs it possible to get the paging in PHP without database call? How will I show the image instead of numbering? any code that can help
calendar in php code - PHP
calendar in php code   Any Idea to create a calendar for school in PHP? I need a simple nd handy code
Need someone to check and modify my simple code - Java Beginners
Need someone to check and modify my simple code   How to write a class that contains Variables that hold hourly rate of pay, number of hours...); } }   Hi Friend, You can use following code: import
php download file code
php download file code  PHP code to download the files from the remote server
run php code online
run php code online  Is it possible to run PHP Code online
Mysql-Php code
Mysql-Php code  I want to mysql script for query data from two tables in the mysql database trough php code. Can you help me   Hi Friend, Please visit the following link:ADS_TO_REPLACE_1 Php Mysql Thanks   
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
cache php code
cache php code  Basically, i'm looking for a code to cache the content of webpage in server side
user authentication code in php - PHP
user authentication code in php  Hi, Can you please send me a user authentication code in php? or just post the guidelines to authenticate a user. Thanks
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
screenshot from code
screenshot from code  hello, how can we Take screenshot from code in iphone ??   hii,ADS_TO_REPLACE_1 I am giving some code for taking screenshot from code and you have to include QuartzCore.framwork in you group
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
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
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
Code
Code  code for connecting c lang to database
code
code  code for android sample program
code for this is
code for this is  a b c d c b a a b c c b a a b b a a a code
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
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
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  write a program to encrypt and decrypt the cipher text "adfgvx"   Hi Friend, Try the following code:ADS_TO_REPLACE_1 import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import
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
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
Sql Examples using php code
Here is the many examples. In this tutorial we discuss many examples of sql statements using php code
JAVA code For
JAVA code For   JAVA code For "Traffic signals Identification for vehicles
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
JAVA CODE
JAVA CODE  JAVA SOURCE CODE TO BLOCK A PARTICULAR WEB SITES(SOCIAL WEB SITE
java code
java code  what is the code to turn off my pc through java program
java code
java code  write a java code to convert hindi to english using arrays
java code
java code  hi any one please tell me the java code to access any link i mean which method of which class is used to open any link in java program
java code
java code  I need the java code that would output the following: HARDWARE ITEMS CODE DESCRIPTION UNIT PRICE K16 Wood screws,brass,20mm $7.75 D24 Wood glue,clear,1 liter $5.50 M93
Java code
Java code   Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff. acceptClothes accepts the noofClothes as argument & returns the noofClothes
java code
java code  need java code for chart or graph which compare the performance of aprior algorithm and coherent rule algorithm.plz any one help me out
java code
java code  write a java code for finding a string in partiular position in a delimited text file and replace the word with the values given by user and write the file in new location
java code
java code  sir how to merge the cells in excel using java code please help me and also how to make the text placed in the cell to be center
java code
java code  sir how to merge the cells in excel using java code please help me and also how to make the text placed in the cell to be center
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
Java code
Java code   Create an Employee class which has methods netSalary... is tax deducted from the salary. Also it has a method grade which would accept... the following code: import java.util.*; class Employee { static Scanner input=new
java code
java code  I am beginer in java my question is how can i fill data from mysql database to jcombobox using netbeans
java code
java code  HOW TO PRINT 1 TO 100 WITHOUT USING CONDITIONAL,ANY LOOP AND ARRAY IN JAVA AND C.URGENT SIR PLZ  Hi, You can use following code: class MyClass { public static void main(String[] args) { int

Ads