# PHP/XML/Flash combo (extra line-breaks)

**URL:** https://forum.kirupa.com/t/php-xml-flash-combo-extra-line-breaks/168339
**Category:** flash
**Created:** [November 6, 2005, 10:07am UTC](https://forum.kirupa.com/t/php-xml-flash-combo-extra-line-breaks/168339 "2005-11-06T10:07:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ch0nG](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@Ch0nG](https://forum.kirupa.com/u/Ch0nG)
#### Post date: [November 6, 2005, 10:07am UTC](https://forum.kirupa.com/t/php-xml-flash-combo-extra-line-breaks/168339/1 "2005-11-06T10:07:11Z")

</div>

Hey all,

I’m having some problems when calling in data from a MySql database.  
I use PHP to generate an XML file, wich then gets called into flash.

any help would be highly appreciated.

What happens is that an extra line-break (or newlin or br or whatever) is added in Flash.

I have put my example here :  
[http://www.indewulf.be/test/keuken.swf](http://www.indewulf.be/test/keuken.swf)

My xml file is here (doesn’t work in IE, works in mozilla) :  
[http://www.indewulf.be/php/keuken.php](http://www.indewulf.be/test/keuken.swf)

All my text fields have HTML enabled in flash,  
this is my main chunk of code :

```auto

var add_next_here = 30;

function GenerateMenu(menu_xml){
	
	var menus = menu_xml.firstChild.childNodes;

	var prijs = menus[0].firstChild;
	prijs_txt.html = true;
	prijs_txt.autoSize = true;
	prijs_txt.htmlText = prijs;
	
	for (var i = 1; i < menus.length; i++){
		this_menu = menus*.childNodes;
		
		for (var i = 1; i < this_menu.length; i++){
			gerecht = this_menu*;
			gerecht_oms = gerecht.childNodes[0].firstChild.nodeValue;
			gerecht_wijn = gerecht.childNodes[1].firstChild.nodeValue;
			if(gerecht_wijn == undefined){gerecht_wijn = '()';}
			
			this_gerecht_mc = main_mc.attachMovie("gerecht_mc","gerecht" add i,i);
			
			// set up shortcuts
			gerecht_txt = this_gerecht_mc.gerecht_txt;
			wijn_txt = this_gerecht_mc.wijn_txt;
			//
			gerecht_txt.autoSize = true;
			// set text
			gerecht_txt.html = true;
			gerecht_txt.htmlText = gerecht_oms;
			wijn_txt.text = gerecht_wijn;
			
			wijn_txt._y = gerecht_txt._height;
			
			this_gerecht_mc._y = add_next_here;
			
			add_next_here += this_gerecht_mc._height + 10;
			
			}		
		}

	bottom = main_mc._y+mask_mc._height-main_mc._height-50;
	}

///////////////////////////////////////////////////////////////////////
// Read in XML, run some functions
//////////////////////////////////////////////////////////////////////
	
var k_xml = new XML ();
k_xml.ignoreWhite = true;
System.useCodepage = false;
k_xml.onLoad = function(success){
	if (success){
		GenerateMenu(this)
		}
		else{
		trace ("Error loading XML file");
		}	
	};
	
k_xml.load("http://www.indewulf.be/php/keuken.php");

```
