Answers for "excec multi line php"

PHP
6

php multiple line string

//use EOD function for multiple line variable
$variable=<<<EOD
  this is line1
  this is line2
  EOD;
Posted by: Guest on June-09-2020
0

multi line dot match php

// This problem can be solved adding the “s” modifier to the regular
// expression. With this modifier, the “.” wildcard character matches 
//any possible character in the string, including newlines:

preg_match("#<body>(.*)</body>#s",$document,$matches)
Posted by: Guest on October-31-2020

Browse Popular Code Answers by Language