Re: [PHP] array_search function bugged? update

2006-03-27 Thread Robin Vickery
On 27/03/06, je killen [EMAIL PROTECTED] wrote: 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

[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 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

Re: [PHP] array_search function bugged?

2006-03-21 Thread Richard Lynch
On Mon, March 20, 2006 8:35 pm, je killen wrote: I really don't understand, though, why you are doing things the way you describe... I only want one image file for each distinct letter, no repeats because I can't put two or more files with the same name in the same dir. The images need to

Re: [PHP] array_search function bugged?

2006-03-21 Thread Richard Lynch
On Mon, March 20, 2006 8:47 pm, je killen wrote: I am using simple for loops. If I create and populate an array and test it with a print statement in a for loop, it prints out all the current values. It I again call it to print in a for loop in subsequent code it has exhibited a degraded

Re: [PHP] array_search function bugged?

2006-03-21 Thread Jim Lucas
Richard Lynch wrote: On Mon, March 20, 2006 8:35 pm, je killen wrote: I really don't understand, though, why you are doing things the way you describe... I only want one image file for each distinct letter, no repeats because I can't put two or more files with the same name in the

Re: [PHP] array_search function bugged?

2006-03-20 Thread Richard Lynch
On Sun, March 19, 2006 4:46 pm, je killen wrote: 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

[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] = '';}

Re: [PHP] array_search function bugged?

2006-03-19 Thread Richard Davey
On 19 Mar 2006, at 22:46, je killen wrote: The code takes a string of ascii letters forming a word and is supposed to create a list of indexes in the proper sequence for reconstructing the word. The object of the code in context is to take Ignoring your code (and the supposed 'bug') for a