View Full Version : noob question. writing xml from mysql

02-18-2006, 11:14 PM
Hello and thanks in advance for any help you can give.
Im trying to populate an xml file with data from a mysql db. I keep getting a parse error and I am too inexperienced to know what I have done wrong.

$line = '<_ path='".$row[path]."' rate='".$row[_path]."' title='".$row[title]."' artist='".$row[artist]."'/>';
echo $line

The red line is the one throwing the parse error.

My browser shows this error:
Parse error: syntax error, unexpected '<' in C:\host\xampp\htdocs\v2\playlist\generator.php on line 12

The code I am using is from a tutorial, but I do not know how accurate it is.


02-18-2006, 11:22 PM
I'v never seen the need for joining variables like that, I jus throw them all in at once.

$line = "<_ path=\"$row[path]\" rate=\"$row[_path]\" title=\"$row[title]\" artist=\"$row[artist]\" />";

dno if thats what your looking for