1

I have this XML string.In which i had concatinate some variables in it.i just want to clarify that when these variable change,does values in XML string also change or not?

    <?php
$nvpstr="
    <Source>
        <Company>".$company."</Company>
        <LeadId>".$leadid."</LeadId>
        <IpAddress>".$IP."</IpAddress>
</Source>";
?>

and is it a true XML to be sent via POST considering that format they provided is this.

2
  • 2
    Before or after... What is the context in which we are capturing the value? Pass by reference vs. pass by value would give you two completely different outcomes. What is a complete, beginning-to-end script? Commented Aug 11, 2012 at 23:58
  • Is it that difficult to change the parameters and then echo the XML ? Commented Aug 12, 2012 at 5:54

1 Answer 1

1

if you change those variables AFTER that block they wont.

or in simple:

$a = 'foo';
$b = 'my $a is: '.$a;
$a = 'bar';

wont change $b to 'bar' and an echo $b; will print out my $a is: foo

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.