Atlas Scientific pH Sensor code problems

Hi guys. I have the AS pH sensor and I want to display the pH value it gets on a 16x2 LCD. The one that comes with the Arduino Starter Kit. I have an Arduino Uno R3. I edited the code that AS provided but I’m getting errors that I can’t solve. I’m starting to think that the edited code is completely wrong. I know that I have 2 void loops but I don’t really know how to merge them correctly. Thanks for the help!

This is my edited code:

#include <LiquidCrystal.h>                                                      //add lcd library
#include <SoftwareSerial.h>                                                    //add the soft serial libray
#define rxpin 2                                                                //set the RX pin to pin 2
#define txpin 3                                                                //set the TX pin to pin 3


SoftwareSerial myserial(rxpin, txpin);                                         //enable the soft serial port
long phReadInterval = 1000; 
long previousMillisPH = 0; 
int PHState = HIGH; 
float PH_Val; 


String inputstring = "";                                                       //a string to hold incoming data from the PC
String sensorstring = "";                                                      //a string to hold the data from the Atlas Scientific product
boolean input_stringcomplete = false;                                          //have we received all the data from the PC
boolean sensor_stringcomplete = false;                                         //have we received all the data from the Atlas Scientific product
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);                                         //initialize the library with the numbers of the interface pins

  void setup(){                                                                //set up the hardware
     Serial.begin(38400);                                                      //set baud rate for the hardware serial port to 38400
     myserial.begin(38400);                                                    //set baud rate for software serial port to 38400
     inputstring.reserve(5);                                                   //set aside some bytes for receiving data from the PC
     sensorstring.reserve(30);                                                 //set aside some bytes for receiving data from Atlas Scientific product
     lcd.begin (16,2);
   }
 
 
 
   void serialEvent() {                                                         //if the hardware serial port receives a char
               char inchar = (char)Serial.read();                               //get the char we just received
               inputstring += inchar;                                           //add it to the inputString
               if(inchar == '\r') {input_stringcomplete = true;}                //if the incoming character is a <CR>, set the flag
              }  
 
 
 
 void loop(){                                                                   //here we go....
     
  if (input_stringcomplete){                                                   //if a string from the PC has been recived in its entierty 
      myserial.print(inputstring);                                             //send that string to the Atlas Scientific product
      inputstring = "";                                                        //clear the string:
      input_stringcomplete = false;                                            //reset the flage used to tell if we have recived a completed string from the PC
      }
 

  while (myserial.available()) {                                               //while a char is holding in the serial buffer
         char inchar = (char)myserial.read();                                  //get the new char
         sensorstring += inchar;                                               //add it to the sensorString
         if (inchar == '\r') {sensor_stringcomplete = true;}                   //if the incoming character is a <CR>, set the flag
         }


   if (sensor_stringcomplete){                                                 //if a string from the Atlas Scientific product has been received in its entirety
       Serial.print(sensorstring);                                             //use the hardware serial port to send that data to the PC
       sensorstring = "";                                                      //clear the string:
       sensor_stringcomplete = false;                                          //reset the flag used to tell if we have received a completed string from the Atlas Scientific product
      }
}

 void getPHvalue()  {                //get PH every interval (1000 ms) 
  unsigned long currentMillisPH = millis(); 
  
  if(currentMillisPH - previousMillisPH > phReadInterval) { 
    previousMillisPH = currentMillisPH;   
    if (PHState == HIGH)  { 
        PHState = LOW; 
        } 
    else  { 
        PHState = HIGH; 
        Serial.print("r\r");  // 'R' reads one value, see stamp doc 
        while (Serial.available() > 0) { 
                // Serial1.parseFloat looks for the next valid float number 
        // in the serial stream. In this case on hardware serial 1 
        PH_Val = Serial.parseFloat(); 
        // look for the carriage return. That's the end of your sentence: 
        if (Serial.read() == '\r') { 
        Serial.println(PH_Val);  // can be used for debug, pc display etc. 
          } 
        } 
        } 
    } 
  } 

 void loop()  
{ 
  getPHvalue(); 

    lcd.setCursor(0,1); 
    lcd.print("PH value: "); 
    lcd.print(PH_Val); 

}

This is the error code:

EZ_com_edited.ino: In function 'void loop()':
EZ_com_edited:109: error: redifinition of 'void loop()'
EZ_com_edited:62: error: 'void loop()' previously defined here

first please use CTRL-T in the IDE, that reformats your code to make it more readable.
second please do not comment code lines that are obvious (do not repeat the code) comments are for the WHY.
to much comments drives away the attention from the code.

looking at the two loops, you should just be able to put the content of the second one into the first one (and remove the empty one).
I do not notice conflicts between the two loops.

Oh okay understood. Sorry about that and thanks for the help!