Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Modify Java code from PHP Code

Have Programming Question? Ask it here!
 
 
 


princesingh
Modify Java code from PHP Code
1 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners


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"); }


Advertisement
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
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
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
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
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
email search code in php
email search code in php  email search with multiple option in php
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: Php Mysql Thanks   Hi Friend
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
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
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
download code from database
download code from database  how to download files from database
JAVA code For
JAVA code For   JAVA code For "Traffic signals Identification for vehicles
screenshot from code
screenshot from code  hello, how can we Take screenshot from code in iphone ??   hii, I am giving some code for taking screenshot from code and you have to include QuartzCore.framwork in you group #include <
java code
java code  write a java code to convert hindi to english using arrays
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  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
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  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  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
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
download xml file from website using java code
download xml file from website using java code  how to download xml file from website using java code
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
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
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
Line From code
Line From code  document.getElementById("demo").innerHTML=Date(); Please explain each and every word in this line
java code
java code  int g() { System.out.println("Inside method g"); int h() { System.out.println("Inside method h"); } } Find the error in the following... cannot define a method inside another method. Anyways, we have modified your code
Java code
Java code  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any... the following code: import java.util.*; import java.text.*; class NumberProgram
java code
java code  java database code to retrieve data at runtime and please... = "select * from employee"; st = con.createStatement(); ResultSet rs = st.executeQuery... language="java"%> <%@page import="java.sql.*"%> <form method="post
code
code    how to write this in java
Java code
Java code  An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus...; Hi Friend, Try the following code: import java.util.*; import
Java code
Java code   Create a calculator class which will have methods add, multiply, divide & subtract   Hi Friend, Try the following code: class Calculation{ public int add(int a,int b){ return a+b
Java code
Java code  Create a class called Student which has the following methods: i. Average: which would accept marks of 3 examinations & return... & returns the name.   Hi Friend, Try the following code: import
Java code
Java code  Create a Bank class with methods deposit & withdraw. The deposit method would accept attributes amount & balance & returns....   Hi Friend, Try the following code: import javax.swing.*; class
Java code
Java code  hi, please suggest me how to extract table name and find the no of select statement and insert statement from a file and dispaly the result of SELECT and INSERT tablewise i.e. abc_table SELECT 4 pgm_table
java code
java code  Create an Employee class which has methods netSalary which would accept salary & tax as arguments & returns the netSalary which is tax deducted from the salary. Also it has a method grade which would accept
code for recently created file from a folder in java - Java Beginners
code for recently created file from a folder in java  how to get the recently created file from a folder in java?  Hi friend, Code to help in solving the problem : import java.io.*; import java.util.Date
java code
java code  develop a banking system in java
java code
java code  Utopias tax accountants always use programs that compute income taxes even though the tax rate is a solid, never-changing 15%. Define... calculateNetPay that determines the net pay of an employee from the number of hours
java code
java code  how to extract html tags using java
java code
java code  what is meaning bufferedreader
java code
java code  what is meaning bufferedreader
Advertisements
 

 

 

DMCA.com