Page 1 of 1

keeping busy

Posted: Thu Jan 15, 2004 11:01 am
by ol4pr0
keeping busy on the XML thing...

and keep on getting stuck nomather in what way i am using the output.

now somewhere on this forum i got this reply.

using this ;

Code: Select all

<?php 

$link = mysql_connect("localhost", "root"); 
$db = mysql_select_db("aduana"); // db 

$output = ''; // make output var 

$query = "SELECT $value1, $value2, value3 FROM $tabla ORDER BY $id? LIMIT 5";  
$result = mysql_query($query, $link); 

while($rows = mysql_fetch_array($result)) {  
 
$output .= <<< XML 

<person> 
   <name>{$rows['name']}</name> 
   <gender>{$rows['gender']}</gender> 
   <age>{$rows['age']}</age> 
<person> 

XML; 

} 

header("Content-Type: text/xml"); 

echo <<< OUT 
?>
the problem or error which is being returned =

Parse error: parse error, unexpected T_SL

cuased by $output .= <<< xml

i am getting very desperate here.. and need to get it to work lol...

Posted: Thu Jan 15, 2004 1:05 pm
by Weirdan
try to remove the space between the '<<<' and 'XML'

<<<

Posted: Thu Jan 15, 2004 1:21 pm
by ol4pr0
i whished that would do the trick..


mainly what i am trying to do is to have something from the databaes being translated to a xml document or format..

and since i am not very familiar with xml-rpc.. or whatever i am bound to do it like this i am afraid untill i do know how to get my pear soap installed and learning rapidly about xml-rpc
thank for trying but the space didnt make a differance