Hi guys,
I've just got a Live search thing working, but the problem is it's reading from an XML file and I've absolutely no idea how to output information from LDAP -> XML using PHP.
I've currently got the following code:
Code PHP:header("Content-type: text/xml"); $xml_output = "<?xml version=\"1.0\"?>\n"; $xml_output .= "<users>\n"; for($x = 0 ; $x < count($var['collar']) ; $x++){ $xml_output .= "\t<user>\n"; $xml_output .= "\t\t<collar>" . $var['collar'] . "</collar>\n"; $xml_output .= "\t\t<firstname>" . $var['firstname'] . "</firstname>\n"; $xml_output .= "\t\t<lastname>" . $var['lastname'] . "</lastname>\n"; $xml_output .= "\t</user>\n"; } $xml_output .= "</users>"; echo $xml_output;
Which I believe is on the right track, however, the code I've got above that is completely wrong and was 100% utter guesswork :P
So, any ideas how to get it from LDAP into XML properly please?
Many thanks!




Bookmarks