There is a standard design:
$temperature_find="<div class=\"report_text temperature\" style=\"color:#A1B2C3;\">"; // далее. $str_pos = strripos($site_contents, $temperature_find); Found the position of the expression in the text. Good.
But he got into a stupor, because the color:#A1B2C3 parameter color:#A1B2C3 dynamic. He is constantly changing.
How to use regular expressions to upgrade this construct?
UPD - I didn’t train my brain, did this:
$temperature_find="<div class=\"report_text temperature\""; $str_pos = strripos($site_contents, $temperature_find); $code_for_out = substr($site_contents, $str_pos+60, 2); I feel that the code from the category 1 + 1 + 1 + 1 = 4, although it would be more correct to 2² = 4
$str_pos_end = strripos($site_contents, $temperature_find_end); $code_out_data = substr($site_contents, $str_pos, ($str_pos_end-$str_pos));$str_pos_end = strripos($site_contents, $temperature_find_end); $code_out_data = substr($site_contents, $str_pos, ($str_pos_end-$str_pos));- I_CaRcolorvalue simply, or replace it, or what? - teran