There are two arrays:
$needles = []; $replacements = []; values are passed to them. in the first array the values of the text, in the second with what to replace them. I try to replace:
$html = preg_replace($needles, $replacements, $html); I end up with an empty string. Php 7 version, how will it be more correct to replace? $ html line is quite large, maybe this is the case?
preg_replace($patterns, $replace, '{startDate} = 1999-5-27');Respectively, the first parameter is an array with patterns to be, not text - Alexey Shimansky$html: an empty string ornull(which behaves like an empty string, if treat it as a string)? - Michael Sivolobov