Code: Select all
function format2xml($xml) {
$transaction = '<TRANSACTION>';
foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '&a;amp;gt; $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '&function format2xml($xml) {
$transaction = '<TRANSACTION>';
foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}Code: Select all
echo '<jay>cart</function format2xml($xml) {
$transaction = '<TRANSACTION>';
foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}Code: Select all
echo '<jay>cart</jay>';$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
Edit| It returns the middle value 'cart' not 'jay'amp;gt; $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrl($xml) {
$transaction = '<TRANSACTION>';
foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
Edit| It returns the middle value 'cart' not 'jay'= '<TRANSACTION>';
foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
Edit| It returns the middle value 'cart' not 'jay'nsaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
Edit| It returns the middle value 'cart' not 'jay' $transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function... :function format2xml($xml) {
$transaction = '<TRANSACTION>';
foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
Edit| It returns the middle value 'cart' not 'jay't;TRANSACTION>';
foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
Edit| It returns the miamp;lt;/'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
Edit| It returns the middle value 'cart' not 'jay'function format2xml($xml) {
$transaction = '<TRANSACTION>';
foreach ($xml as $keyname => $value) {
$transaction .= '<'.$keyname.'>'.$value.'</'.$keyname.'>';
}
$transaction .= '</TRANSACTION>';
return $transaction;
}
Okay the array I pass to it is fine, but the < and > are disapeering and only the last $keyname is appearing in the string. Sort of a weird thing to happen. But I wrote a little test echo to see if I was just forgetting something in this function
Code: Select all
echo '<jay>cart</jay>';Same results as my function...
Edit| It returns the middle value 'cart' not 'jay'