Click here to Skip to main content
15,947,476 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: How to prevent html and PHP mixing up Pin
Weekendrockstar30-Aug-14 7:32
Weekendrockstar30-Aug-14 7:32 
GeneralRe: How to prevent html and PHP mixing up Pin
Alex Manolescu8-Jan-15 2:17
Alex Manolescu8-Jan-15 2:17 
Questionarray_diff to insert all unchecked checkbox Pin
Jelly Fish916-Aug-14 19:05
Jelly Fish916-Aug-14 19:05 
QuestionInvoicce in PHP Pin
FKM_16-Jul-14 17:06
FKM_16-Jul-14 17:06 
AnswerRe: Invoicce in PHP Pin
PIEBALDconsult16-Jul-14 17:32
mvePIEBALDconsult16-Jul-14 17:32 
GeneralRe: Invoicce in PHP Pin
FKM_16-Jul-14 17:35
FKM_16-Jul-14 17:35 
GeneralRe: Invoicce in PHP Pin
Richard MacCutchan16-Jul-14 22:51
mveRichard MacCutchan16-Jul-14 22:51 
QuestionCreating XML SOAP Request using PHP Pin
MICHAEL DENNIS JOSEPH9-Jul-14 6:36
MICHAEL DENNIS JOSEPH9-Jul-14 6:36 
I Need to create this XML using PHP:
HTML
<con:ContractOptions>
	<con:ContractOption>
		<con:Id>49</con:Id>
		<con:Description>Diesel/Turbo</con:Description>
		<con:IsSurcharge>false</con:IsSurcharge>
		<con:NetCost>150.00</con:NetCost>
	</con:ContractOption>
		<con:ContractOption>
			<con:Id>50</con:Id>
			<con:Description>AWD/4WD</con:Description>
			<con:IsSurcharge>false</con:IsSurcharge>
			<con:NetCost>100.00/con:NetCost>
	</con:ContractOption>
		<con:ContractOption>
			<con:Id>51</con:Id>
			<con:Description>Commercial Vehicle</con:Description>
			<con:IsSurcharge>false</con:IsSurcharge>
			<con:NetCost>75.00</con:NetCost>
	</con:ContractOption>
</con:ContractOptions>

Here is the section of my PHP code to build that XML:
HTML
$ContractOptionFields = array(
"con:Id" => $OptionId,
"con:Description" => $Surcharge_Description,
"con:IsSurcharge" => $IsSurcharge,
"con:NetCost" => $OPTION_NetRate
);

$ContractOptions = array(
"con:ContractOption" => new SoapVar($ContractOptionFields, SOAP_ENC_OBJECT)
);

$arcontract = array(
"con:ContractOptions" => new SoapVar($ContractOptions, SOAP_ENC_OBJECT), ...


My code will only produce one set of contract options like this:
HTML
<con:ContractOptions>
<con:ContractOption>
<con:Id>49</con:Id>
<con:Description>Diesel/Turbo</con:Description>
<con:IsSurcharge>false</con:IsSurcharge>
<con:NetCost>150.00</con:NetCost>
</con:ContractOption>
</con:ContractOptions>

How do I build more than one option into this XML using my PHP code sample? Do I need to use a PHP for Loop? Not sure how to set this up.

Thanks for your assistance.
Questiondemanded apps.... Pin
Akanksha Rawat7-Jul-14 20:21
Akanksha Rawat7-Jul-14 20:21 
AnswerRe: demanded apps.... Pin
Richard MacCutchan7-Jul-14 22:31
mveRichard MacCutchan7-Jul-14 22:31 
Questionhelp 4 coding Pin
Akanksha Rawat7-Jul-14 20:17
Akanksha Rawat7-Jul-14 20:17 
AnswerRe: help 4 coding Pin
Richard MacCutchan7-Jul-14 22:30
mveRichard MacCutchan7-Jul-14 22:30 
QuestionCalling PHP function and return array Pin
Member 1029700324-Jun-14 18:47
Member 1029700324-Jun-14 18:47 
AnswerRe: Calling PHP function and return array Pin
xiaoqiangdiandian27-Jun-14 21:01
xiaoqiangdiandian27-Jun-14 21:01 
QuestionPHP, Sql 2008, Web Services and JSON Pin
Member 1029700320-Jun-14 18:26
Member 1029700320-Jun-14 18:26 
AnswerRe: PHP, Sql 2008, Web Services and JSON Pin
vivekkamate7-Jul-14 1:42
vivekkamate7-Jul-14 1:42 
QuestionSQLServer2005 Pin
MianSaeedShahid19-Jun-14 5:23
MianSaeedShahid19-Jun-14 5:23 
Questionrecommended PHP Framework Pin
Jassim Rahma4-Jun-14 10:12
Jassim Rahma4-Jun-14 10:12 
AnswerRe: recommended PHP Framework Pin
HardikPatel.SE5-Jun-14 4:01
professionalHardikPatel.SE5-Jun-14 4:01 
AnswerRe: recommended PHP Framework Pin
Daniel Lieberwirth (BrainInBlack)28-Jun-14 0:03
professionalDaniel Lieberwirth (BrainInBlack)28-Jun-14 0:03 
QuestionPHP & MySQL Pin
Xekria27-May-14 10:14
Xekria27-May-14 10:14 
AnswerRe: PHP & MySQL Pin
Xekria27-May-14 10:17
Xekria27-May-14 10:17 
GeneralRe: PHP & MySQL Pin
Xekria27-May-14 10:20
Xekria27-May-14 10:20 
QuestionRe: PHP & MySQL Pin
Richard MacCutchan27-May-14 21:21
mveRichard MacCutchan27-May-14 21:21 
AnswerRe: PHP & MySQL Pin
mrjay4227-Oct-14 22:34
mrjay4227-Oct-14 22:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.