Known parameters:
1) the paragraph will start after a string of dashes
"---------------------------------------------"
2) there will be a hard return after the string of dashes
3) each paragraph will end with a hard return which you may identify with chr(10).
The following code works, but surely there is a better way to write this:
Expand|Select|Wrap|Line Numbers
- //find start of dashes
- $sDash = strpos(trim($c["NOTES"]) , "-----");
- //find end of dashes
- $eDash = strrpos(trim($c["NOTES"]) , "-----");
- //what is the length of the dashes
- $lDash = $eDash-$sDash;
- //find start position of the first paragraph after dashes
- $sPara = substr ( trim($c["NOTES"]) , $eDash+5);
- //find the length of the first paragraph by finding the 2nd hard return
- $ePara = strpos ($sPara , chr(10),2);
- //paragraph extracted
- $cPara = substr ($sPara,0,$ePara);
Note: Kim is Mike XXXXXX assistant.
--------------------------------------------------------------------------------
03/07/11 - Greg XXXXXX won the 10th door prize at the Open House. klk
03/04/11 - Greg XXXXXXX attended the Open House. klk
11/11/10 - Michael XXXXXX was removed by MVM / kaw
02/09/10 - Laura XXXXX got married. Her new name is Laura XXXXXX. MDB/klk
03/06/09 - Sherwin XXXX won a prize at the Open House. klk
09/26/2008 - Attended CBBEL's reception at the Ill XXXXXXX at Chicago Hilton. Was able to visit with many people from this firm including Chris, Jason, John, John and many more. Everyone was having a good time and I thanked them all for their business and the invite to the event. jdf
09/23/2008 - Jason XXXXXX called with an RFP for 1,000+ lineal feet for the proposed Lake County Campus project in Libertyville. This is good news because they have the master planning contract for that site and we should be in line to get the buildings when they go. I reminded Jason of our XXXXX office in Lake County. jdf
09/19/2008 - Bryan XXXX called with an RFP for geo on a project in Schaumburg. Since MDB already is working on the same one for other consultants he will handle this one as well. jdf