djoxer Posted June 20, 2007 Share Posted June 20, 2007 I'm a newbie at PHP so I apologize for the dumb question. Can anyone please explain to me in plain english what these two lines are asking for? if ($line!="*\r\n") if (($line_num%2)==0) Thanks -Dan Quote Link to comment Share on other sites More sharing options...
onewaylife Posted June 20, 2007 Share Posted June 20, 2007 In first line if condition is true only when $line variable is not equal to string *\r\n in other line if condition is true only when reminder of ($line_num%2) is equal to 0 Quote Link to comment Share on other sites More sharing options...
KrisNz Posted June 20, 2007 Share Posted June 20, 2007 to elaborate a little more, the '%' means Modulus, that is, the remainder of a division. e.g 2%2 = 0; 3%2 = 1; Quote Link to comment Share on other sites More sharing options...
djoxer Posted June 29, 2007 Author Share Posted June 29, 2007 One more question: What does *\r\n mean? Is it similar to chr(10)chr(13)? Thanks for your help. Dan Quote Link to comment Share on other sites More sharing options...
bluebyyou Posted June 29, 2007 Share Posted June 29, 2007 its a string containing those: \r or "carriage return" or chr(10) (like you said) \n or "newline character" or chr(13) (like you said) I dont know exactly what it means with out seeing all of the code, it looks like some sort of regex thing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.