Welcome Guest, Not a member yet? Register   Sign In
[solved]Turn a php class into CI library?
#4

[eluser]Shay Falador[/eluser]
Well I was wrong and you were doing what I said wrong too Smile
Code:
function myXml($scanDataFile) {

   $xml_data = simplexml_load_string(file_get_contents($scanDataFile));
    
   $this->load->library('XmlToArray',$xml_data,'xmlObj');

   //Creating Array
   $arrayData = $this->xmlObj->createArray();

   //Displaying the Array
   echo "<pre>";
  print_r($arrayData);
  echo "</pre>";
  exit;
} // End of function myXml

You should consider using REQUIRE_ONCE and calling it normally because you may want more than once..


Messages In This Thread
[solved]Turn a php class into CI library? - by El Forum - 01-29-2010, 03:18 PM
[solved]Turn a php class into CI library? - by El Forum - 01-29-2010, 03:28 PM
[solved]Turn a php class into CI library? - by El Forum - 01-29-2010, 04:01 PM
[solved]Turn a php class into CI library? - by El Forum - 01-29-2010, 04:22 PM
[solved]Turn a php class into CI library? - by El Forum - 01-30-2010, 07:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB