Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_string_between($string, $start = "", $end = ""){
- if (strpos($string, $start)) { // required if $start doesnt exist in $string
- $startCharCount = strpos($string, $start) + strlen($start);
- $firstSubStr = substr($string, $startCharCount, strlen($string));
- $endCharCount = strpos($firstSubStr, $end);
- if ($endCharCount == 0) {
- $endCharCount = strlen($firstSubStr);
- }
- return substr($firstSubStr, 0, $endCharCount);
- } else {
- return '';
- }
- }
- //Pos psaxno gia ta New cases sto pdf
- //new_cases
- $new_cases = trim(get_string_between($fulltext, 'νόσου είναι', ', εκ'));
- if($new_cases == ""){
- $new_cases = trim(get_string_between($fulltext, 'κρούσματατης νόσου είναι', '.'));
- if($new_cases == ""){
- $new_cases = trim(get_string_between($fulltext, 'νόσου αυξήθηκαν κατά', '.'));
- if($new_cases == ""){
- $new_cases = trim(get_string_between($fulltext, 'κρούσματατηςνόσουείναι', ','));
- if($new_cases == ""){
- $new_cases = trim(get_string_between($fulltext, 'κρούσματατηςνόσουείναι', '.'));
- if($new_cases == ""){
- $new_cases = trim(get_string_between($fulltext, 'καταγράφηκαν τις τελευταίες 24 ώρες είναι', ','));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement