sorry all for the mistake in the code;
in this line 'array $input' should be string $input.
function word_wise(array $input, int $what) //returns an array
so it reads
function word_wise(string $input, int $what) //returns an array
this should be the only mistake. I added this stuff as an afterthou
Hi all
Here is an update on my problem reported with the array_search function.
to those who directed me to the bug report page, thanks.
There are a number of reports specific to this function. Maybe event
someone else has written a fix.
here is my solution to my problem.
The following code* was
The following code does not produce the correct results (for my
purposes):
function code($str, $match, $formula)
{
for($i = 0; $i < count($str); $i++)
{
$formula[$i] = array_search($str[$i], $str);// <<==|| no bueno
//print $formula[$i]; not right
if($formula[$i] < $i)
{$str[$i] = '';
3 matches
Mail list logo