Code: Select all
create_function('$matches', 'return strtoupper($matches[0]);'), $fixedtxt);
$wxalltext[$i] = $fixedtxt;
Any qualified people around? -
Moderator: daj
Code: Select all
create_function('$matches', 'return strtoupper($matches[0]);'), $fixedtxt);
$wxalltext[$i] = $fixedtxt;
Code: Select all
function('$matches'){ return strtoupper($matches[0]);} , $fixedtxt);
$wxalltext[$i] = $fixedtxt;
Bingo!beteljuice wrote: ↑Thu 15 Aug 2019 1:15 am That's php 7.2 message ....
I was getting confused about what it did, until I realised it was part of a larger construct.
This is the part that's the problem:
create_function('$matches', 'return strtoupper($matches[0]);'), $fixedtxt);
See if this works or not:... although I'm in the dark with php7.xCode: Select all
function('$matches'){ return strtoupper($matches[0]);} , $fixedtxt); $wxalltext[$i] = $fixedtxt;
Code: Select all
$text = preg_replace('!\.\s+([a-z])!es',"'. ' . strtoupper('\\1')",$text);
Code: Select all
$text = preg_replace_callback('!\.\s+([a-z])!s',
function ($matches) { return('. ' . strtoupper($matches[1]) ); }
,$text);