Parsing text file with PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lka527
    New Member
    • Apr 2010
    • 15

    #16


    is the actual result screen shot I just took..

    Comment

    • chathura86
      New Member
      • May 2007
      • 227

      #17
      it is because of the

      High-Resolution CT Scans
      Center for Quantitative Imaging
      Penn State University

      section

      modify it to check if the second part exists

      Code:
      //explode from the :
      		$fields = explode(":", $line, 2);
      
      		echo "<b>$fields[0]</b>";
      
      //checks if second part exists 
      		if (isset($fields[1]))
      			echo " : $fields[1]";
      
      		echo "<br/>";

      Comment

      • lka527
        New Member
        • Apr 2010
        • 15

        #18
        oh!!!!!! it works now!
        Thank you so much!!!!!!!!!!! !!!!!!!!!!!!!!

        I will post more questions as I have .
        I appreciate your help so much!!!!!!!!!!! !!!

        You are my hero:)

        Comment

        • philipwayne
          New Member
          • Mar 2010
          • 50

          #19
          Gets line from file pointer and parse for CSV fields

          Comment

          Working...