3

Im using the answer to this question to convert an array of XML to a single XML output:

Output array of XML to plain XML

Im using the simpler solution of the two there (Marked as the answer)

It all works for me, however at the start of the output I get:

string(109960) "

Can anyone shed any light on this?

1
  • Can you share the snippet? It might be that you are using Var_dump() somewhere. Commented Mar 31, 2010 at 18:24

2 Answers 2

2

This looks like you are using var_dump to output your XML string :

var_dump($xml);

Instead of just using echo :

echo $xml;


It would explain :

  • The quotes arround the whole XML string
  • The string -- which is the type of the variable passed as a parameter to var_dump
  • The 109960 -- which is the length of your string.

var_dump() is useful ; but should only be used when you are debugging, as it outputs more (debugging) informations than just the content of the variable.

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

Comments

0

Looks like something is being var_dump(ed). If there is a var_dump keyword, you should remove it.

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.