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



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


princesingh
Modify Java code from PHP Code
1 Answer(s)      2 years and 9 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
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
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
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  what is the code to turn off my pc through java program
JAVA CODE
JAVA CODE  JAVA SOURCE CODE TO BLOCK A PARTICULAR WEB SITES(SOCIAL WEB SITE
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
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  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  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
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
Line From code
Line From code  document.getElementById("demo").innerHTML=Date(); Please explain each and every word in this line
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
 

 

 

DMCA.com