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 Link to comment https://forums.phpfreaks.com/topic/56313-plain-english/ 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 Link to comment https://forums.phpfreaks.com/topic/56313-plain-english/#findComment-278197 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; Link to comment https://forums.phpfreaks.com/topic/56313-plain-english/#findComment-278226 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 Link to comment https://forums.phpfreaks.com/topic/56313-plain-english/#findComment-285458 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. Link to comment https://forums.phpfreaks.com/topic/56313-plain-english/#findComment-285494 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.