The site on Dle, there is such a regular schedule:

$row['full_story'] = preg_replace( "'text-align:right;'si", "righttt", $row['full_story'] ); $row['full_story'] = preg_replace( "'text-align:left;'si", "lefttt", $row['full_story'] ); $row['full_story'] = preg_replace( "'text-align:center;'si", "centerrr", $row['full_story'] ); $row['full_story'] = preg_replace( "'<img'si", "<amp-img layout=\"responsive\" width=\"1080\" height=\"610\"", $row['full_story'] ); $row['full_story'] = preg_replace( "'<!--dle_image_end-->'si", "</amp-img>", $row['full_story'] ); $row['full_story'] = preg_replace( "'<iframe'si", "<amp-iframe layout=\"responsive\" sandbox=\"allow-scripts allow-same-origin allow-popups\"", $row['full_story'] ); $row['full_story'] = preg_replace( "'</iframe>'si", "</amp-iframe>", $row['full_story'] ); 

But it does not work correctly. After the first replacement, it deletes the rest of the text, what is the error?

  • Read what a limiting character is in a regular expression and what is the escaping of meta characters. - ReinRaus
  • @Slaxor Show the values ​​of $ row ['full_story'] before executing the specified code, then after each line, up to the line after which the error occurs - Alexus

0