[PHP] array_search function bugged update errata

2006-03-26 Thread je killen
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

[PHP] array_search function bugged? update

2006-03-26 Thread je killen
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

[PHP] array_search function bugged?

2006-03-19 Thread je killen
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] = '';